Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 8
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 12059 times and has 7 replies Next Thread
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Options to recover corrupted files

Hi,

I need your help to help me choose the best tradeoff to recover corrupted Sweet Home 3D files. By corrupted, I mean the files that were correctly saved but which data changed afterwards because of a bad file transfer, a bad handling of the user or a hard disk failure, and that Sweet Home 3D refuses to open.
As a .sh3d file is actually some kind of a ZIP file containing other files, some ZIP tools are quite often able to extract some of the files of a corrupted .sh3d file (but not all), like the Home entry that describe furniture, walls and rooms, the furniture 3D models and the texture images.
If the Home entry is corrupted, Sweet Home 3D can't display anything, but if it's correct (and most of the time, it is from the files I had to fix), the "only" missing data will be some 3D models or images.
Nowadays, when a user request me to fix a corrupted .sh3d file, I run some kind of ZIP tool I programmed that is able to extract all the correct files it contains, remove the furniture with a missing 3D model, remove references to missing images, and save a correct .sh3d file with the remaining information. As this tool works pretty well (even if the corrupted data is lost), I'd like to add it to Sweet Home 3D to let users repair their file by themselves.
But instead of adding it as a new menu item, I propose to simply run it during an Open operation when it fails. Thus, if the user tries to open a corrupted file, instead of getting a simple error message, his file will be opened if it's partially valid, displaying only the valid data and an error message about the corrupted data. To avoid a wrong loss of the corrupted file, the user would have to confirm he wants to write over it when he saves his home later.
What do you think of this behavior?
What should display the error message to avoid any misleading (note that it could list the lost furniture and textures)?

But I could do better in a future version: as a valid Home entry of a .sh3d file contains also furniture and textures names and their id (when it exists), the program could explore the furniture and textures catalog used by a Sweet Home 3D user, and try to reassign the lost 3D models and images to the matching ones found in the catalog.
Doing this is also risky because ids and names could have changed between the currently running instance of Sweet Home 3D and the instance that was used when the .sh3d file was saved before getting corrupted.
An other behavior could be also to replace missing 3D models by red (or an other color) boxes and images by a red color to let the user better view which 3D models couldn't be retrieved…
What do you think?

Thanks for your help...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 5, 2014, 6:54:18 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hal9000
Advanced Member
Member's Avatar

Spain
Joined: May 9, 2012
Post Count: 154
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files


In general I think this feature would be very useful for desperate users with a corrupted project file.

Now my two cents...
  • I would not open the file and then show the error; instead I would first show the error dialog and then ask the user if he/she still want to open the file
  • in case the user decides to go on and open the corrupted file, SH3D should offer the two possibilities:

    • remove corrupted elements
    • replace corrupted elements with a red image or red box
    • (or even a third option to try and search the elements in the catalog of the user, as mentioned))

  • even in the case of an invalid Home entry, would it be possible to recover the images and/or furniture? if so, I think this option should be offered to the user in case he/she has used some object or image for which there not exist a copy so at least it could be recovered


As for the error message I guess something of this kind:
"The SH3D project file you're trying to open is damaged. The following images/furniture has been lost:
...
...

SH3D can still open the project, but these images/fournitures will be ignored (they will disappear) or replaced by red squares (for images) and a red boxes (for furniture), as you prefer.

What do you want to do?
[Ignore damaged elements] [Replace damaged elements] [Don't open the file]"


Or for the last point I proposed (in case it's feasible):
"The SH3D project file you're trying to open is damaged. The plan has been lost and the file cannot be opened.

SH3D can still try to recover some images/furniture used in the project and save them to a folder so you can use it in a new project.

What do you want to do?
[Extract viable images/furniture] [Don't open the file]"

----------------------------------------
If a long walk every day were healthy, mailmen would be immortal. tongue
----------------------------------------
[Edit 1 times, last edit by hal9000 at May 5, 2014, 7:36:26 PM]
[May 5, 2014, 7:35:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

Thanks for your suggestions. Displaying the message first isn't a bad idea, since it would probably help to get more attention from the user and retrieve the option he wants for the corrupted items.

About the invalid Home entry, I don't think it's worth trying something; first, if it's corrupted, the other entries (if present) are generally not accessible because it's the first entry in the file. Second, the other entries contain images or 3D models with no information about their role, place and size in the plan.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 7, 2014, 8:54:30 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hal9000
Advanced Member
Member's Avatar

Spain
Joined: May 9, 2012
Post Count: 154
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

About the invalid Home entry, I don't think it's worth trying something; first, if it's corrupted, the other entries (if present) are generally not accessible because it's the first entry in the file. Second, the other entries contain images or 3D models with no information about their role, place and size in the plan.


Well, you're right that if the first entry is not accessible probably neither would be the rest of entries. But in case they are, would depend on each case that it worth to extract or not.

If the user has other copies of the images/objects or he/she can access these elements any way then all is fine, but I just think of the possibility that the user has no access to the elements he/she used and doesn't have other copies. In such cases I guess it would be interesting to recover what can be recovered so it can be used in a new project, even if some information like the size is lost. Let's say it's just a way that user may think at least not everything is lost. smile
----------------------------------------
If a long walk every day were healthy, mailmen would be immortal. tongue
[May 7, 2014, 9:49:44 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

The automatic recovery of SH3D files was released tonight in version 4.4. Thanks again for your ideas. smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 12, 2014, 11:19:16 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Cheryllorraine
Newbie



Usa
Joined: Dec 18, 2019
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

I have an important question regarding file corruption. I did get the ' file corruption ' error and it replaced all my exported furniture and textures with red squares. It got restored, but I HAVE LOST THOUSANDS OF EXPORTS. Only the few in software appear. Does this mean I will have to import all over again?
[Oct 3, 2020, 1:25:25 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

I guess you mean "imported furniture" rather than "exported furniture".
Did you transfer your file? What happened before you got this error? If a crash happened, you could try to get the last version of the file you opened by looking in the sub folders of C:\Users\user\AppData\Roaming\eTeks\Sweet Home 3D\work (where "user" is a login name). If you can find some files starting by "open" and suffixed by ".sweethome3d" in these folders, it will contain the a copy of the document you recently opened. Copy the most recent file(s), change its extension to .sh3d and try to open it with Sweet Home 3D.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 5, 2020, 6:04:48 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
harbinger
Member
Member's Avatar

US
Joined: Feb 27, 2014
Post Count: 87
Status: Offline
Reply to this Post  Reply with Quote 
Re: Options to recover corrupted files

Maybe there can be an option for the File Recovery function to LIST the differences in the corrupted file and that of it last saved version.
Users should be made aware of what would be lost with recovery...
[Oct 10, 2020, 3:55:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved