Page 1 of 1

Segmentation fault in Annotate function

Posted: 2014-12-29T01:58:48-07:00
by NightBird
I use imagemagick (perl module) in debian, and 8:6.7.7.10+dfsg-5 is the latest working version for me. Every version thereafter crashes when calling the annotate function:

Code: Select all

$ perl -e 'use Image::Magick; my $image = new Image::Magick(); $image->Set(size=>"100x100"); $image->ReadImage("canvas:white"); $image->Annotate(font=>"Arial", pointsize=>40, fill=>"green", text=>"121212");'
Segmentation fault

Code: Select all

# dpkg -l | grep magick
ii  imagemagick-common                       8:6.8.9.9-4                  all          image manipulation programs -- infrastructure
ii  libimage-magick-perl                     8:6.8.9.9-4                  all          Perl interface to the ImageMagick graphics routines
ii  libimage-magick-q16-perl                 8:6.8.9.9-4                  i386         Perl interface to the ImageMagick graphics routines -- Q16 version
ii  libmagickcore-6.q16-2:i386               8:6.8.9.9-4                  i386         low-level image manipulation library -- quantum depth Q16
When running the script in gdb, I get this:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
__GI___libc_realloc (oldmem=0x1, bytes=4102) at malloc.c:2977
2977    malloc.c: No such file or directory.
No idea where to look next. Someone here who can help me out?

Re: Segmentation fault in Annotate function

Posted: 2014-12-29T07:42:53-07:00
by magick
We tried your perl command-line with ImageMagick 6.9.0-2, the latest release, and it completed without complaint.

Re: Segmentation fault in Annotate function

Posted: 2015-05-04T00:08:49-07:00
by NightBird
Well, that's great. But debian doesn't have any newer version than this 6.8.9.9. I'd like to know how I can find out what's wrong on my system/installation that the 'annotate' function stopped working. I'm sure there's some other program or library that conflicts with the annotate function in imagemagick and I'd like to find out what it is and how to resolve this.
Could you help me with that?

Re: Segmentation fault in Annotate function

Posted: 2015-05-04T09:52:08-07:00
by herwinw
This bug has already been reported to the Debian bug tracker: https://bugs.debian.org/cgi-bin/bugrepo ... bug=777158

But since the chances of getting a newer version into Debian are pretty small (which is an understatement): if anyone would have a clue where to find the problem, that would be appreciated.

Re: Segmentation fault in Annotate function

Posted: 2015-05-04T11:10:01-07:00
by NightBird
Ah, thanks for pointing me there. Indeed, would be great to find a solution (except for keeping the old version installed :)).

Re: Segmentation fault in Annotate function

Posted: 2015-05-15T14:15:09-07:00
by broucaries
They are a patch magick at end of thread https://bugs.debian.org/cgi-bin/bugrepo ... bug=777158

It is a problem of include path...

Re: Segmentation fault in Annotate function

Posted: 2015-05-15T14:15:37-07:00
by broucaries

Re: Segmentation fault in Annotate function

Posted: 2015-05-15T16:33:40-07:00
by magick
We added the patch to ImageMagick 6.9.1-3 Beta, available by sometime tomorrow. Thanks.