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 345802 - Gimp hangs opening corrupt .xcf file
Gimp hangs opening corrupt .xcf file
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-06-24 09:21 UTC by Brion Vibber
Modified: 2006-07-10 16:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Corrupt XCF file triggering the bug (39.29 KB, application/octet-stream)
2006-06-24 09:23 UTC, Brion Vibber
Details
Stack trace (2.81 KB, text/plain)
2006-06-24 09:25 UTC, Brion Vibber
Details

Description Brion Vibber 2006-06-24 09:21:16 UTC
Some incorrectly tagged image files in our old CVS repository got corrupted when we switched our source control to Subversion. When I tried to load an .xcf file which had been missed when correcting this, Gimp hung: 100% CPU, no UI response.

The loop appears to be infinite or practically so; it will run for at least a couple of hours, but doesn't appear to leak memory while it goes.

Will attach the file to this report.

Steps to reproduce:
1) Save corrupted file to disk
2) Launch Gimp
3) File/Open, navigate file browser to the file.
4) Select the file

Expected behavior:
Image should either generate a thumbnail successfully or reject it as corrupt.

Actual behavior:
No UI response; Gimp eats 100% CPU in apparently infinite loop.

With 2.3 compiled from CVS, I also see a lot of console output:

unexpected/unknown image property: 808003850 (skipping)unexpected/unknown image property: 170469680 (skipping)unexpected/unknown image property: 808003850 (skipping)unexpected/unknown image property: 170469680 (skipping)

This pattern seems to repeat over and over.

Discovered on Mac OS X / PowerPC, confirmed on Linux / x86, present in both 2.2 and 2.3 current.
Comment 1 Brion Vibber 2006-06-24 09:23:51 UTC
Created attachment 67927 [details]
Corrupt XCF file triggering the bug

An XCF image corrupted during our CVS -> Subversion conversion.

Corrected version of this file available for comparison:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/images/icons/fileicon-ogg.xcf
Comment 2 Brion Vibber 2006-06-24 09:25:32 UTC
Created attachment 67928 [details]
Stack trace

Stack trace taken by attaching to the hung process with GDB.
(This is Gimp 2.3 CVS; it seems to be caught while printing
the error message to the console.)
Comment 3 Sven Neumann 2006-07-10 16:41:03 UTC
Fixed in the HEAD branch, the file is now rejected as corrupt.

2006-07-10  Sven Neumann  <sven@gimp.org>

	* app/xcf/xcf-load.c: use a signed variable when attempting to
	skip over unknown properties and check for EOF.  Fixes bug #345802.

	* app/xcf/xcf-read.c: cleanup, nothing really changed
Comment 4 Sven Neumann 2006-07-10 16:45:46 UTC
Merged to the stable branch, closing as FIXED.