Page 1 of 1

Crash with some PSD files

Posted: 2010-04-16T09:24:59-07:00
by Drarakel
Hi,

I'm using ImageMagick to read PSDs sometimes. I saw that some changes were made in that area lately, so that the reading is quicker and greyscale PSDs work too. That's really great! But with some PSDs, I'm getting crashes now.
Currently I'm using IM v6.6.1-3 (Q16), on Windows XP. Now normally I would assume that it's only my system or that the PSDs are strange.. But: The PSDs worked with older versions of ImageMagick.

Probably I'll have to give you such a file to reproduce it. I'm not that eager to upload the big PSDs, but here is one:
PSD :) (Edit: Link now removed)

The flattened layer is ok, but if I want to access any other layer, IM just crashes (even with identify).
These commands work:
convert print.psd[0] test.bmp
identify print.psd
These don't work:
convert print.psd test.bmp
identify +ping print.psd
identify -verbose print.psd[1]

With convert, some pixel cache files are created sometimes and in the middle of it it crashes. I see no messages of IM (even with -verbose). I can use '-debug all', but I don't know where to look there..
The error that I get (it won't be very useful; the text from Windows is also in german ;)):
http://i44.tinypic.com/10p6d81.png

Now I think I tracked it down to IM v6.6.0.9. The version 6.6.0.8 still works with these files - the later ones will give the crashes. With v6.6.0.9, according to the version history the 'support for monochrome PSD images' was added. Maybe it has something to do with that?

Other things that I noticed:
As I said, the PSDs that give me crashes now, worked with the older IM versions. But the files showed an error there. It said something like this:
"convert: Insufficient image data in file 'print.psd' @ error/psd.c/DecodeImage/268."
(With even older versions I got the message "convert: pixels are not authentic 'print.psd' @ cache.c/QeueAuthenticNexus/4304" instead.) But even with these messages, I could access/output all layers (even if not all of them gave a 'fine' output). And this 'error' affected only one layer while the crashes on the new IM versions occur on all layers (except the flattened layer).
Another thing: I'm getting also crashes with all the other (fine) PSD files, when I use the -ping option. A command like "identify -verbose -ping somefile" works for 'normal' files (PNG etc.), but not for PSD files. Again just a crash. Strangely enough, the command "identify -ping -verbose somefile" works (with PSDs) - but probably the -ping does nothing there. I normally don't use -ping, so I'm not sure if I used that option wrongly..
I don't know if any of this is related to the main problem.

Are there other ImageMagick commands that I could test so that I can perhaps access the layers on the problematic PSD files?

Re: Crash with some PSD files

Posted: 2010-04-16T11:25:17-07:00
by magick
We can reproduce the problem you posted and have a fix in ImageMagick 6.6.1-4 Beta available by sometime tomorrow. Thanks.

Re: Crash with some PSD files

Posted: 2010-04-16T13:08:30-07:00
by Drarakel
Thanks!
(I think I'll wait for the next release version - it's not that urgent for me.)

Re: Crash with some PSD files

Posted: 2010-04-18T20:14:28-07:00
by Drarakel
I've tested with IM version 6.6.1-4. My problematic PSD files all work now!
Thanks again - for that great piece of software and for the fix! :D