GNOME Bugzilla – Bug 345051
Opening a .png file as a layer in a .gif file crashes the GIMP
Last modified: 2008-01-15 13:08:43 UTC
I am running GIMP on my Windows XP machine. Service Pack 2, 512mb ram, AMD Sempron 3000+ fsb 133mhz video card is Nvidia GeForce FX5200, and sound is integrated NForce 2 Audio. Bug - If I open a .gif file in the GIMP, and then go to File-->Open as Layer and choose a .png file, I get an instant crash with no error messages. I also converted the .png into a .jpeg, but it still crashed when I tried to add the layer. I have reproduced this many times, and I always get the same crash. As far as I know, this applies to all files of those types. I have tried different sizes of files, but they all crash the program.
Created attachment 67445 [details] screenshot
I forget to mention, I have also reproduced this bug on another computer, same version of GIMP, Widows XP Service Pack 2.
Works fine in GIMP 2.3, haven't tried with GIMP 2.2 yet.
Don't we have a similiar report about pasting into indexed images already?
I can confirm that GIMP 2.3 works fine, but GIMP 2.2.11 doesn't. Although it did not crash for me, the new layer appared to be almost garbage. I could recoginize some of the features of the original image but with the wrong colors, so it is very likely that GIMP 2.2 did not convert the pixel data to the appropriate mode (INDEXEDA in this case). I tried to run it within valgrind, but unfortunately I only have the stock gimp-2.2.11 binary from Debian testing without debug symbols, so valgrind was not so helpful: ==13966== ==13966== Invalid write of size 1 ==13966== at 0x81DA091: (within /usr/bin/gimp-2.2) ==13966== by 0x81FD34C: (within /usr/bin/gimp-2.2) ==13966== by 0x81FD734: (within /usr/bin/gimp-2.2) ==13966== by 0x81F90E4: (within /usr/bin/gimp-2.2) ==13966== by 0x8232975: (within /usr/bin/gimp-2.2) ==13966== by 0x80861DC: (within /usr/bin/gimp-2.2) ==13966== by 0x46DF39F: g_cclosure_marshal_VOID(i_xx_t) (in /usr/lib/libgobject-2.0.so.0.1000.2) ==13966== by 0x46D2A5A: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.1000.2) ==13966== by 0x46E274C: (within /usr/lib/libgobject-2.0.so.0.1000.2) ==13966== by 0x46E3B26: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.1000.2) ==13966== by 0x46E3EDD: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.1000.2) ==13966== by 0x41E60E7: gtk_dialog_response (in /usr/lib/libgtk-x11-2.0.so.0.800.18) ==13966== Address 0x73A42D0 is 0 bytes after a block of size 8,192 alloc'd ==13966== at 0x401C422: malloc (vg_replace_malloc.c:149) ==13966== by 0x47362AF: g_malloc (in /usr/lib/libglib-2.0.so.0.1000.2) ==13966== by 0x825D75E: (within /usr/bin/gimp-2.2) ==13966== by 0x825D71E: (within /usr/bin/gimp-2.2) ==13966== by 0x825E319: (within /usr/bin/gimp-2.2) ==13966== by 0x825BB45: (within /usr/bin/gimp-2.2) ==13966== by 0x825BDCA: (within /usr/bin/gimp-2.2) ==13966== by 0x81FD2B4: (within /usr/bin/gimp-2.2) ==13966== by 0x81FD734: (within /usr/bin/gimp-2.2) ==13966== by 0x81F90E4: (within /usr/bin/gimp-2.2) ==13966== by 0x8232975: (within /usr/bin/gimp-2.2) ==13966== by 0x80861DC: (within /usr/bin/gimp-2.2) ==13966== ==13966== More than 100000 total errors detected. I'm not reporting any more. ==13966== Final error counts will be inaccurate. Go fix your program! ==13966== Rerun with --error-limit=no to disable this cutoff. Note ==13966== that errors may occur in your program without prior warning from ==13966== Valgrind, because errors are no longer being displayed. ==13966==
Regarding comment #4: There is probably such a bug report already, although I cannot find it right now. But I just tested dragging a RGBA layer into an INDEXEDA image andI got exactly the same bad behavior as "Open As Layer". This is again with GIMP 2.2.11. GIMP 2.3 (current CVS) works fine.
Thanks. Is 2.3 available for download on Windows?
You can get the 2.3.x version for Windows by following the links to the installer from the gimp home page. But instead of clicking on the download links, click on "project page" from the menu on the left. This will show you the sourceforge project page for the installer. Then click on the download button there and you will be able to see the various versions that are available. Keep in mind that 2.3.x is the unstable version, so you may find new bugs in that version (even if the bug mentioned here is gone).
The bug mentioned in comment #4 could be bug #321855, which is marked as FIXED. It is indeed fixed in CVS and GIMP 2.3.x, but may still be open for GIMP 2.2.x because I managed to get strange results with 2.2.11 (see comment #6).
2006-08-22 Sven Neumann <sven@gimp.org> * app/core/gimplayer.c (gimp_layer_convert): backport the fix for bug #321855 from the HEAD branch. Fixes bug #345051.
*** Bug 392751 has been marked as a duplicate of this bug. ***