I have recently discovered two bugs in the CVS version of GIMP. The other I have submitted as a bug report, but this one I really tried hard to fix myself first, so I decided to send it along as a mail rather than attempt to squeeze all this stuff into a web-report form. GIMP does not save images sometimes, even if the dirty flag is set. This one has been reported in the past, I believe -- it has been attributed to the "trust_dirty_flag" option being set, or improperly checked somehow (at least according to those who helped me in the #gimp(gimpnet) and #e(efnet) IRC channels). I don't believe this is the case. After some hunting around, I discovered that file_save was actually being called. I inserted some debugging information in fileops.c, which I have attached a diff of (attachment #3). This is against the most recent anonymous CVS as of the writing of this email. Although this problem appears to occurr on all fileformats, the only one I can reliably repeat it on is .xpm. nosave.xpm (attachment #1) is a file from an IceWM theme i was working on which, once opened, no matter how it is altered, will not save. I have tried this 30 or 40 times, so I consider it repeatable. :-) I have also attached the output of a session where I open GIMP, change the image (fill it with white, to be exact) then attempt to save it, then quit, with the additional logging stuff in fileops.c. The procedural_db_execute call appears to be failing, and I didn't have enough time to start hunting through the procedural db or XPM code yet. I figure that this will be enough of a head-start for a someone who actually knows their way around the code already :-) In case it matters: this is a RedHat 6.1 TOTALLY stock install, with one very small exception (I add a TrueType fontserver (xfstt) to the stock xfs that RH provides) . I wiped my harddrive and installed a "GNOME Workstation" install before doing this test. This means: gtk+/glib-1.2.5, glibc-2.1.2, egcs-2.91.66, XFree86-3.3.5. ---- The Tao is like a glob pattern: It is masked but always present. used but never used up. I don't know who built to it. It is like the extern void: It came before the first kernel. filled with infinite possibilities. [glyph@xxxxxxxxxxxxxxxxx]
/* XPM */ static char * titleAL_xpm[] = { "16 16 2 1", " g None", ". g #000000", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................", "................"};
Message: Passed serialization test gimage is an active drawable didn't find file proc first time found file proc second time, continuing... procedure: (file_xpm_save) I conclude, returning 0.
Index: fileops.c =================================================================== RCS file: /cvs/gnome/gimp/app/fileops.c,v retrieving revision 1.77 diff -r1.77 fileops.c 987c987,994 < return FALSE; --- > { > g_print("gimage is not an active drawable\n"); > return FALSE; > } > else > { > g_print("gimage is an active drawable\n"); > } 992c999,1006 < file_proc = file_proc_find (save_procs, raw_filename); --- > { > g_print("didn't find file proc first time\n"); > file_proc = file_proc_find (save_procs, raw_filename); > } > else > { > g_print("found file proc first time, continuing...\n"); > } 995c1009,1016 < return FALSE; --- > { > g_print("didn't find file proc second time, giving up\n"); > return FALSE; > } > else > { > g_print("found file proc second time, continuing...\n"); > } 1010c1031 < --- > g_print("procedure: (%s) \n",proc->name); 1049c1070 < --- > g_print("I conclude, returning %d.\n",return_val);