loading png file crashes the program

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sweetchariot
Posts: 1
Joined: 2012-04-06T13:43:14-07:00
Authentication code: 8675308

loading png file crashes the program

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: loading png file crashes the program

Post 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.
Post Reply