After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345051 - Opening a .png file as a layer in a .gif file crashes the GIMP
Opening a .png file as a layer in a .gif file crashes the GIMP
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.2.x
Other All
: Normal critical
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
: 392751 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-06-15 21:28 UTC by Stephen Roof
Modified: 2008-01-15 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (115.78 KB, image/jpeg)
2006-06-15 21:37 UTC, Stephen Roof
Details

Description Stephen Roof 2006-06-15 21:28:15 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.
Comment 1 Stephen Roof 2006-06-15 21:37:29 UTC
Created attachment 67445 [details]
screenshot
Comment 2 Stephen Roof 2006-06-15 21:42:16 UTC
I forget to mention, I have also reproduced this bug on another computer, same version of GIMP, Widows XP Service Pack 2.
Comment 3 Sven Neumann 2006-06-16 08:10:23 UTC
Works fine in GIMP 2.3, haven't tried with GIMP 2.2 yet.
Comment 4 Michael Schumacher 2006-06-16 08:42:10 UTC
Don't we have a similiar report about pasting into indexed images already?
Comment 5 Raphaël Quinet 2006-06-16 08:46:35 UTC
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==
Comment 6 Raphaël Quinet 2006-06-16 08:52:10 UTC
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.
Comment 7 Stephen Roof 2006-06-16 11:43:08 UTC
Thanks.  Is 2.3 available for download on Windows?
Comment 8 Raphaël Quinet 2006-06-16 13:29:57 UTC
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).
Comment 9 Raphaël Quinet 2006-06-21 11:40:45 UTC
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).

Comment 10 Sven Neumann 2006-08-22 16:24:22 UTC
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.
Comment 11 Sven Neumann 2007-01-04 14:43:23 UTC
*** Bug 392751 has been marked as a duplicate of this bug. ***