Page 1 of 1

loading png file crashes the program

Posted: 2012-04-06T15:50:42-07:00
by sweetchariot
I've compiled the latest version of imagemagick for the mac and I get the assertion below when I load a particular png file. This is a bit of a hassle as it crashes the program in debug mode. Anyone ever seen this before? Any workarounds?

Code: Select all

Assertion failed: (quantum_info->signature == MagickSignature), 
function DestroyQuantumInfo, file magick/quantum.c, line 215.
Thanks
Sid

Re: loading png file crashes the program

Posted: 2012-04-06T17:52:16-07:00
by glennrp
Hard to tell what's wrong without seeing the problematic PNG or knowing what platform you're on, or whether you mean IM-6.7.6-4 or IM-7.0.0-0 is the "latest". Anyhow, it looks like it might be a bad interaction between the libpng "setjmp" mechanism and IM's ThrowReaderException, due to a recent change that reduced the scope of quantum_info. Please try replacing line 2888 in coders/png.c
  • ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
with
  • png_error(ping,"Failed to allocate quantum_info");
If that helps, then there are a few other similar situations that we'll need to fix as well.