assertion failure blobtoimage

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jorgjorg
Posts: 12
Joined: 2014-04-09T03:42:22-07:00
Authentication code: 6789

assertion failure blobtoimage

Post 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
smolyn
Posts: 1
Joined: 2014-10-15T12:30:10-07:00
Authentication code: 6789

Re: assertion failure blobtoimage

Post 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);
jorgjorg
Posts: 12
Joined: 2014-04-09T03:42:22-07:00
Authentication code: 6789

Re: assertion failure blobtoimage

Post by jorgjorg »

Great, thanks! Was trying to make a patch myself but I'm not experienced enough (;
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: assertion failure blobtoimage

Post 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).
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply