UK
Joined: May 3, 2010
Post Count: 223
Status:
Offline
Should Sweet Home install version be deleting its temp files...
Hi Emmanuel,
Should the Sweet Home (installed version) be deleting its temp files after a user exits out of the program?
I have been very busy, opening and testing lots of Sweet Home files and suddenly noticed my System partition free hard drive space has suddenly nearly filled up.
After a quick search, I have discovered that, (on Windows 7) my Users\(user name)\AppData\Local\Temp folder now contains 23.6 GB of Sweet Home files. I did mention I had been busy!
Is this normal, or should the temp files, in that location, be erased after program closure?
France
Joined: Nov 7, 2005
Post Count: 9176
Status:
Offline
Re: Should Sweet Home install version be deleting its temp files...
Should the Sweet Home (installed version) be deleting its temp files after a user exits out of the program?
Yes, it should (and it does under Mac OS X and Linux), but I discovered recently a bug in Java that prevents the deletion of some temporary files under Windows. I reported it to the Java bug database in June but I'm astonished they didn't make the bugs public yet: Bug #6962459 - Can' t delete zip files accessed with jar protocol Bug #6962458 - Files tagged with deleteOnExit are not deleted when accessed with jar protocol
I could program a workaround but this would imply big changes to get something clean, therefore I prefer to wait and see what Oracle is going to do with these bugs. Once they are made public, I will ask users to vote for them.
Sorry for the inconvenience.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: Nov 7, 2005
Post Count: 9176
Status:
Offline
Re: Should Sweet Home install version be deleting its temp files...
For your information, I programmed some kind of workaround in version 3.0: temporary files are now stored in subdirectories of C:\Users\user\AppData\Roaming\eTeks\Sweet Home 3D\work, and the files that still can't be automatically deleted at program end, will be deleted during a further program launch when they are more than one week old.
Now that the bugs #6962459 and #6962458 are publicly visible, please, please vote for them.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: Nov 7, 2005
Post Count: 9176
Status:
Offline
Re: Should Sweet Home install version be deleting its temp files...
I found how to apply the workaround proposed in the bug #6962458, so temporary files created by Sweet Home 3D will be automatically deleted at program end from version 4.1.
With the Java Web Start, the Jar executable and the Online version, a few JAR and DLL files will still appear in Windows temporary directory, because I don't think the workaround proposed by Oracle can be applied for these files. As these files are always the same for a given version of Sweet Home 3D, I managed these files with some kind of cache to avoid duplicating them at each launch of the program. You'll recognize these cached files from their com.eteks.sweethome3d.SweetHome3D or com.eteks.sweethome3d.applet.AppletApplication prefix. If you remove them, they will be automatically created again at next program launch.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer