GNOME Bugzilla – Bug 304352
JPEG plugin crashes after checking/unchecking preview in 'save as jpeg' dialog
Last modified: 2005-05-23 16:10:26 UTC
Steps to reproduce: 1. Load a JPEG with EXIF data 2. Save it with 'save as', name it and press 'Save' in the 'Save Image' dialog 3. Check 'Show Preview in image window" 4. Uncheck 'Show Preview in image window' and GIMP crashes. I started GIMP in verbose mode and append it to this bug report. Stack trace: I'm not able to provide a stack trace. It seems that GIMP totally crashed, because it doesn't handle keyboard events anymore. Thats the following output I got when running in verbose mode. gimp-2.3 --verbose This is a development version of The GIMP. Debug messages may appear here. INIT: gimp_load_config Parsing '/usr/local/etc/gimp/2.0/gimprc' Parsing '/home/roman/.gimp-2.3/gimprc' gimp_composite: use=yes, verbose=no Processor instruction sets: +mmx +sse +sse2 -3dnow -altivec -vis Adding theme 'Default' (/usr/local/share/gimp/2.0/themes/Default) Adding theme 'Small' (/usr/local/share/gimp/2.0/themes/Small) Writing '/home/roman/.gimp-2.3/themerc' INIT: gimp_initialize INIT: gimp_real_initialize INIT: gui_initialize_after_callback INIT: gimp_restore brush factory: loading data pattern factory: loading datapalette factory: loading data gradient factory: loading data INIT: gui_restore_callback GimpClipboard: writable pixbuf format: image/png GimpClipboard: writable pixbuf format: image/x-icon GimpClipboard: writable pixbuf format: image/jpeg INIT: gimp_real_restore Starting extension: 'extension_script_fu' INIT: gui_restore_after_callback loading menu '/usr/local/share/gimp/2.0/menus/toolbox-menu.xml' for /toolbox-men ubar *** attempt to put segment in horiz list twice *** attempt to put segment in horiz list twice jpeg-load: found EXIF block (8382 bytes) loading menu '/usr/local/share/gimp/2.0/menus/image-menu.xml' for /image-menubar *** attempt to put segment in horiz list twice *** attempt to put segment in horiz list twice *** attempt to put segment in horiz list twice *** attempt to put segment in horiz list twice file_save_dialog_check_uri: URI = file:///tmp/dsc02425.jpg file_save_dialog_check_uri: basename = dsc02425.jpgfile_save_dialog_check_uri: selected save_proc: NULL file_save_dialog_check_uri: URI save_proc: JPEG image file_save_dialog_check_uri: basename save_proc: JPEG image file_save_dialog_check_uri: no save_proc was selected from the list file_save_dialog_check_uri: use URI's proc 'JPEG image' so indirect saving works jpeg-save: saving EXIF block (8387 bytes) jpeg-load: found EXIF block (8382 bytes) /usr/local/lib/gimp/2.0/plug-ins/jpeg: fatal error: Segmentation fault /usr/local/lib/gimp/2.0/plug-ins/jpeg (pid:10717): [E]xit, [H]alt, show [S]tack trace or [P]roceed: s p gimp-2.3: terminated: Interrupt Other information:
GIMP doesn't crash for me, only the jpeg plug-in. I think this is probably what happened for Roman as well, in spite of the misleading error messages, so I am changing the summary accordingly. Unfortunately, the cause looks like memory corruption -- stack traces show different error messages and crashes in different places on each run. I would try valgrind but I don't know how to apply it to a plug-in.
Probably a broken libexif. How to run a plugin with valgrind is described in devel-docs/debug-plug-ins.txt.
The crash happens even for images without exif, and even if GIMP is configured and built without libexif.
Okay, not too hard to figure out using valgrind. 2005-05-16 Bill Skaggs <weskaggs@primate.ucdavis.edu> * plug-ins/jpeg/jpeg-load.c: Don't detach from drawable if it belongs to a preview layer. Fixes bug #304352. Might be worth checking the stable branch to make sure it doesn't happen there. (I don't have a 2.2 build to check.)
The plugin doesn't crash with GIMP 2.2 (tried my debian installation on sid).
*** Bug 305102 has been marked as a duplicate of this bug. ***