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 685086 - hangs while opening damaged XCF file
hangs while opening damaged XCF file
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.8.2
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-29 01:53 UTC by Ari Pollak
Modified: 2012-10-02 20:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
corrupted image (4.00 KB, image/x-xcf)
2012-09-29 01:54 UTC, Ari Pollak
Details
backtrace (33.28 KB, text/plain)
2012-09-29 01:54 UTC, Ari Pollak
Details

Description Ari Pollak 2012-09-29 01:53:56 UTC
From http://bugs.debian.org/687241:

I tried open a xcf image that I later realized was damaged probably by
filesystem corruption some time ago. The gimp endlessly outputs the
message "Gimp-Core-CRITICAL **: gimp_image_parasite_attach: assertion
`parasite != NULL' failed", eats 100% cpu and must be killed. Same
happens if I select the file in open dialog and the thumbnail is
calculated.

I think the Gimp should detect such corrupted files and avoid the
endless loop.

The image (which seems to be just first 4 kb of original one) and
gdb output are attached.
Comment 1 Ari Pollak 2012-09-29 01:54:24 UTC
Created attachment 225368 [details]
corrupted image
Comment 2 Ari Pollak 2012-09-29 01:54:38 UTC
Created attachment 225369 [details]
backtrace
Comment 3 Michael Natterer 2012-10-02 20:08:15 UTC
Thanks, fixed in master and 2-8:

commit 018a02d8dadcffbc4ebd337ee35930ebff59091b
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Oct 2 22:00:16 2012 +0200

    Bug 685086 - hangs while opening damaged XCF file
    
    Fix crash for this specific XCF corruption (XCF damaged in the middle
    of a parasite header). Instead, abort loading immediately.
    (cherry picked from commit 191c2c15efe25d9dde5770262621b1788022c4bc)

 app/xcf/xcf-load.c |   38 +++++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 9 deletions(-)