Upgrade broke PerlMagick

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
erinspice

Upgrade broke PerlMagick

Post by erinspice »

I just upgraded from 6.2.4 for 6.3.2 and now my perl script is segfaulting. I just did the standard

Code: Select all

$ ./configure; make; make install
$ cd PerlMagick
$ perl Makefile.PL; make; make install
And I'm getting this error:

Code: Select all

user@domain.com [~/www/image]# ./mcp.pl "8" "6" "10" "#eeeeee" "#ffffff" "#ffffff" "#777777" "Erin" "590823" "-5"
endday = 161
today = 272
stamp is 1191194457
today comes last
26 and 254
0.0928571428571429 and 13
Segmentation fault (core dumped)
The code immediately after the print statement is:

Code: Select all

my $image = Image::Magick->new(size=>"$width x $height",background=>'white');
my $x = $image->Read(filename=>'/home/user/www/image/blank.png');
$x && warn $x;
But it never gets to the warn statement. This code had been working fine for months before the upgrade.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Upgrade broke PerlMagick

Post by magick »

We can't help unless you post your code so we can reproduce the problem or at least post a stack trace showing the source of the fault.
erinspice

Re: Upgrade broke PerlMagick

Post by erinspice »

Here's the code. It looks like perl isn't compiled with debugging enabled. I'm using ImageMagick 6.3.5 now (upgraded again) and PerlMagick 6.3.5 and getting the same problem.

My blank.png: http://erin.thespicelands.com/blank.png

Code: Select all

#!/usr/bin/perl

use Image::Magick;


my $width = 150;
my $height = 35;
my $factor = .4;
my $barwidth = int(($width-2)*$factor);
my $barheight = 8;
my $lightcolor = "#ffffff";
my $medcolor = "#ffffff";
my $darkcolor = "#eeeeee";
my $textborder = "#777777";
my $name = "Erin";
my $message = "is due in 100 days.";
my $filename = "test.png";


my $image = Image::Magick->new(size=>"$width x $height",background=>'white');
my $x = $image->Read(filename=>'/home/erin/blank.png');
$x && warn $x;


my $x = $image->Draw(fill=>$textborder, primitive=>'rectangle',points=>"-1,-1 $width,$height", antialias=>0);
$x && warn $x;


my $greywidth = $width-2;
my $greyheight = $height-2;
my $whitestart = $barheight+2;
$x = $image->Draw(fill=>$lightcolor, primitive=>'rectangle', points=>"1,$whitestart $greywidth,$greyheight", antialias=>0);
$x && warn $x;


$greyheight -= $barheight;
$x = $image->Draw(fill=>$medcolor, primitive=>'rectangle', points=>"1,1 $greywidth,$barheight", antialias=>0);
$x && warn $x;


$x = $image->Draw(fill=>$darkcolor, primitive=>'rectangle', points=>"1,1 $barwidth,$barheight", antialias=>0);
$x && warn $x;


$x = $image->Annotate(fill=>$textborder,pointsize=>10,text=>"$name $message",y=>$height-14,x=>$width/2,align=>'Center');
$x && warn $x;


$x = $image->Write(filename=>"$filename");
$x && warn $x;
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Upgrade broke PerlMagick

Post by magick »

We tried your script with ImageMagick 6.3.6-0 Beta and it worked without complaint. If we get a chance we'll try it with ImageMagck 6.3.5-10 the current release.
Post Reply