Page 1 of 1

assertion failure blobtoimage

Posted: 2014-09-23T05:52:47-07:00
by jorgjorg
magick/blob.c:338: BlobToImage: Assertion `image_info != (ImageInfo *) ((void *)0)' failed.


Code:

Magick::Blob mblob_in;
mblob_in.updateNoCopy(data, data_length);
std::vector<Magick::Image> images;

Magick::readImages(&images, mblob_in);

data/data_length is 133562 bytes of a 2-page PDF, but also fails with jpeg


Version: ImageMagick 6.8.9-8 Q16 x86_64 2014-09-23 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jng jpeg lzma pangocairo png tiff xml zlib

Re: assertion failure blobtoimage

Posted: 2014-10-15T12:33:08-07:00
by smolyn
This appears to be a bug in Magick++/STL.h

It's a super easy one line fix:
--- a/Magick++/lib/Magick++/STL.h
+++ b/Magick++/lib/Magick++/STL.h
@@ -2669,6 +2669,7 @@
MagickCore::ImageInfo
*imageInfo;

+ imageInfo=options.imageInfo();
GetPPException;
images=MagickCore::BlobToImage(imageInfo,blob_.data(),blob_.length(),
exceptionInfo);

Re: assertion failure blobtoimage

Posted: 2014-10-16T00:46:15-07:00
by jorgjorg
Great, thanks! Was trying to make a patch myself but I'm not experienced enough (;

Re: assertion failure blobtoimage

Posted: 2014-10-16T04:03:47-07:00
by dlemstra
Thanks! I just submitted a patch for this to our repository and the bug will be fixed in the next release of ImageMagick (6.8.9-9).