GNOME Bugzilla – Bug 345802
Gimp hangs opening corrupt .xcf file
Last modified: 2006-07-10 16:45:46 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.
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
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.)
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
Merged to the stable branch, closing as FIXED.