GNOME Bugzilla – Bug 306617
brush/pattern temp files not cleaned up with stingy-memory-use turned on
Last modified: 2008-01-15 12:55:33 UTC
Please describe the problem: I notices a lot of small files (a few bytes to a few kilobytes) in GIMP's "tmp" directory after GIMP was shut down. Traking the problem I found out that these files are created during startup of GIMP. Steps to reproduce: 1. Empty the "tmp" directory of GIMP (similar to ~/.gimp*/tmp/) when GIMP is not running 2. Start GIMP and then look into the directory 3. Terminate GIMP, look into the directory again Actual results: A lot of new files are created during startup, and they are not deleted during shutdown Expected results: Temporary files should be removed after each GIMP session Does this happen every time? Yes (AFAIK) Other information: I think this effect was not there in previous versions of GIMP
What kind of temporary files are these?
What kind is a "kind of file"? (Can you elaborate?) The files are binary files. Do you need an example archive of those? Can't you reproduce?
No, we can't reproduce. Merely starting the GIMP does not create any temporary files. Are you sure you're telling us the *exact* steps of what you're doing? If you move your ~/.gimp-2.2 directory out of the way and start from defaults, does it happen? Feel free to attach an archive of the files here if you can't tell what they are yourself.
Reproducing the problem, I found out that the files are created before plugins are scanned (i.e. quite early). I also found out that when removing the dot-gimp directory, the problem vanished with using new defaults.
Created attachment 47413 [details] ZIP ARchive with a sample "tmp" directory, as well as "diff -ur" of old and new dot-gimp directories
Ah, you had stingy-memory-use turned on. Probably this code should be simply removed, it's really not that useful anymore; the GUI pref has already vanished.
Right, I wanted to get rid of that code for GIMP 2.4 anyway.
Done in the HEAD branch. I don't see a point in trying to do anything about this problem in the stable tree. The preference option is off by default and there's no GUI to enable it. Closing as FIXED. 2005-06-08 Sven Neumann <sven@gimp.org> Removed "stingy-memory-use" all over the place. This feature was really not that useful anymore. The GUI for the preference option was already removed for GIMP 2.2. Fixes bug #306617. * app/config/gimpbaseconfig.[ch]: set IGNORE flag on "stingy-memory-use". * app/config/gimpcoreconfig.h: added a comment that the font_path_writable variable is unused. * app/base/temp-buf.[ch]: removed code that used to deal with swapping temp-bufs to disk. * app/base/base.c: made base_config a static variable. * app/core/gimpdata.[ch] * app/core/gimpdatafactory.[ch]: removed stingy_memory_use parameter from data construction methods. * app/core/gimp-gradients.c * app/core/gimpbrush-load.[ch] * app/core/gimpbrush.[ch] * app/core/gimpbrushgenerated.[ch] * app/core/gimpbrushpipe.[ch] * app/core/gimpcontext.c * app/core/gimpgradient-load.[ch] * app/core/gimpgradient.[ch] * app/core/gimppalette-import.c * app/core/gimppalette.[ch] * app/core/gimppattern.[ch]: changed accordingly.
In reply to "I don't see a point in trying to do anything about this problem in the stable tree. The preference option is off by default and there's no GUI to enable it.": An option is inactive if it's ignored from the configuration files (even better: warn about an option being obsolete), but not when it's no longer offered in a GUI. The use has no chance to turn it off then. When on, the stable release makes some nonsense. I wouldn't consider the problem to be fixed, unless you postulate that old configuration settings have to be deleted for any new version (which would bee poor software design IMHO).
I think perhaps you did not quite understand what Sven was saying. What he meant, I believe, is that any change as extensive as this runs a risk of breaking something, and the problem, although it certainly exists, is not serious enough to make it worth running that risk in the stable branch. After all, you only provoked the problem by hand-editing the configuration file, and not very many people are going to be doing that.
Ulrich is right, we should disable the feature in the 2.2 branch. That is a simple fix that bears no risk of breaking anything.
2005-06-09 Sven Neumann <sven@gimp.org> * app/config/gimpbaseconfig.c: ignore the user setting for "stingy-memory-use" and use the default value which is FALSE. Fixes bug #306617 for the stable branch.
In reply tom comment #10: How can you say that I hand-edited the configuration file? Once when there was a GUI checkbox for the option, I had selected it. Since then it remained in my configuration file. I also agree that any change may break something. However in the current state the option was parsed without warning (as well as being activated), even though (it seems to me) some essential code for handling that option had been removed or modified that it introduced the problem I have described inhere.
Nothing was altered or removed, the "stingy-memory-use" simply thing has been broken for ages.
With an unmodified user profile, the problem still appears with GIMP-2.2.8.
How does the problem still appear? The setting in your gimprc should be ignored.
WHen I suffered from the problem, I had renamed my "do GIMP" directory and let GIMP create a new one. The problem went away then. After upgrading to the newer version I put back the original "dot GIMP" directory, and the problem is back also. For me this means the setting is still recognized and used.