|
Sweet Home 3D Forum » List all forums » » Forum: Sweet Home 3D bar » » » Thread: Options to recover corrupted files |
|
| Print at Feb 4, 2026, 9:31:22 PM | View all posts in this thread on one page |
| Posted by Puybaret at May 5, 2014, 6:54:18 PM |
|
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 creator |
| Posted by hal9000 at May 5, 2014, 7:35:00 PM |
|
Re: Options to recover corrupted files Now my two cents...
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. ![]() |
| Posted by Puybaret at May 7, 2014, 8:54:30 AM |
|
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 creator |
| Posted by hal9000 at May 7, 2014, 9:49:44 AM |
|
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. ![]() ---------------------------------------- If a long walk every day were healthy, mailmen would be immortal. ![]() |
| Posted by Puybaret at Jun 12, 2014, 11:19:16 PM |
|
Re: Options to recover corrupted files The automatic recovery of SH3D files was released tonight in version 4.4. Thanks again for your ideas. ![]() ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by Cheryllorraine at Oct 3, 2020, 1:25:25 AM |
|
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? |
| Posted by Puybaret at Oct 5, 2020, 6:04:48 PM |
|
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 creator |
| Posted by harbinger at Oct 10, 2020, 3:55:23 AM |
|
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... |
|
|
Current timezone is GMT Feb 4, 2026, 9:31:22 PM |