Re: Problem with ReadImage() --> Assertion in CloneStringInfo()

Tabor Kelly <[email protected]> Mon, 27 Jun 2011 09:40:59 -0700
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
On Mon, Jun 27, 2011 at 8:22 AM, Tabor Kelly <[email protected]> wrote:
> Hello, I am new to MagickCore. I am just trying to read an image in. I
> wrote simple a program to demonstrate a problem that I am having in a
> more complex program. It is very simple, I am not sure what I am doing
> wrong. I am attempting to read temp.jpg from the current working
> directory. However, when I do I get the following output:
>
> a.out: magick/string.c:261: CloneStringInfo: Assertion
> `string_info->signature =3D=3D 0xabacadabUL' failed.
>
> This is on Ubuntu 10.04 with (I believe) ImageMagick 6.5.7-8 if that
> makes a difference. Here is the source to my demo program in its
> entirety:
>
> // C/C++ includes
> #include <cstring>
>
> // ImageMagick include
> #include "magick/MagickCore.h"
>
> int main (int argc, char **argv)
> {
> =A0 =A0Image * pImage;
> =A0 =A0ImageInfo imageInfo;
> =A0 =A0ExceptionInfo exceptionInfo;
>
> =A0 =A0imageInfo.signature =3D MagickSignature;
> =A0 =A0strncpy(imageInfo.filename, "temp.jpg", MaxTextExtent);
> =A0 =A0pImage =3D ReadImage(&imageInfo, &exceptionInfo);
>
> =A0 =A0return EXIT_SUCCESS;
> }
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> Tabor
>

Well, I feel like and idiot because I didn't memset() imageInfo and
exceptionInfo to 0. However, now that I am I am getting the following
error:

coders/jpeg.c:952: ReadJPEGImage: Assertion `exception->signature =3D=3D
0xabacadabUL' failed.

I have also upgraded to ImageMagick 6.7.0-9.

-Tabor