GNOME Bugzilla – Bug 102910
Add support for CMYK, Bitmap etc PSD files
Last modified: 2008-08-09 03:59:57 UTC
The PSD plug-in cannot load attached file: *** Unpacking overshot destination (94) buffer by 4 bytes! *** Unpacking overshot destination (94) buffer by 1 bytes! *** Unpacking overshot destination (94) buffer by 7 bytes! *** Unpacking overshot destination (94) buffer by 27 bytes! *** Unpacking overshot destination (94) buffer by 27 bytes! *** Unpacking overshot destination (94) buffer by 36 bytes! *** Unpacking overshot destination (94) buffer by 5 bytes! <snip> *** Unpacking overshot destination (74) buffer by 45 bytes! *** Unpacking overshot destination (74) buffer by 47 bytes! /usr/lib/gimp/1.2/plug-ins/psd: fatal error: Segmentation fault Problem occurs both with 1.2.x and 1.3.x
Created attachment 13436 [details] Photoshop file that should hold map of Alabama
I can confirm this.
The PSD plug-in crashes in seek_to_and_unpack_pixeldata(). Tested with gimp-1.3.15.
Created attachment 17555 [details] [review] Crash fix.
The attached fix defensively avoids the crash. (It doesn't result in a correctly-loaded image -- but it does avoid the crash.) I'll check in something like this to 1.2 now.
Okay, fixes for the crash checked into 1.2 and HEAD. If someone could verify HEAD that'd be great (because I can't).
HEAD doesn't crash any longer but spits lots of output to the console (*** Unpacking overshot destination (74) buffer by x bytes!) and shows some garbled image. Is that a broken PSD file that cannot be loaded or is there still a problem in the plug-in code?
> HEAD doesn't crash any longer but spits lots of output to the console > (*** Unpacking overshot destination (74) buffer by x bytes!) and shows > some garbled image. That's expected in this case (though obviously not good). > Is that a broken PSD file that cannot be loaded or is there still a > problem in the plug-in code? It's not clear to me whether it's a broken file or not (don't have time to analyse, sorry).
I'm not 100 % sure if this file is ok, but both Paint Shop Pro (iirc) and certainly PhotoShop can load the file and disblay a correct image. I'll try to get more files from where this one came from and see if they all give the same result.
I tried to load the file with Paint Shop Pro and it shows a garbled image as well. Let's just forget about that image, because maybe it's corrupt after all. However, I found another image (http://www.mapresources.com/download/?userID=6634.1066473969 the map of Africa) that I can't load as well. This time Gimp politely refuses with: "Error: Can't convert PSD mode to GIMP base imagetype"
Some more info. According to the PS spec the following modes exist: Bitmap (0), Grayscale (1), Indexed (2), RGB (3), CMYK (4), Multichannel (7), Duotone (8) and Lab (9). The psd plug-in currently only supports Grayscale, Indexed and RGB. The file in http://www.mapresources.com/download/?userID=6634.1066473969 is of type CMYK, and thus not supported.
Adding new image types to the PSD plug-in is IMHO clearly an enhancment.
*** Bug 125859 has been marked as a duplicate of this bug. ***
Comment on attachment 17555 [details] [review] Crash fix. This patch was committed some time ago.
*** Bug 318843 has been marked as a duplicate of this bug. ***
*** Bug 311320 has been marked as a duplicate of this bug. ***
Is this bug still valid? At least the attached file shows no signs of issues.
Indeed, seems like the new PSD plugins deals with this. Closing as OBSOLETE.