You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jason <jt...@cartmanager.net> on 2003/09/03 19:31:13 UTC

mod_perl and GD.pm segfault

Embedded Perl version v5.8.0 for Apache/1.3.27 (Unix) PHP/4.3.2 mod_perl/1.28 mod_ssl/2.8.14 OpenSSL/0.9.6b

I am trying to use a simple script that will display an jpeg or png image using GD.pm (readily available from CPAN)

I am getting
[Wed Sep  3 10:41:37 2003] [notice] child pid 832 exit signal Segmentation fault (11)
This happens only when the script is loaded in mod_perl... In normal perl/apache it works without the segfault.... Any Ideas as to
why?

I have traced the segfault down to the line
print $img->png();

I have simplified my script to this, and it segfaults on the "img->png" command


#!/usr/bin/perl
use strict;
use GD;
my $img = GD::Image->new(11,12);
my $white = $img->colorAllocate(255,255,255);
my $black = $img->colorAllocate(0,0,0);
$img->rectangle(1,1,4,5,$black);
$| = 1;
print   "Content-type: image/png\n\n";
my $tmp = $img->png();
print $tmp;
exit;



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: mod_perl and GD.pm segfault

Posted by Stas Bekman <st...@stason.org>.
Jason wrote:
> Embedded Perl version v5.8.0 for Apache/1.3.27 (Unix) PHP/4.3.2
> mod_perl/1.28 mod_ssl/2.8.14 OpenSSL/0.9.6b
> 
> I am trying to use a simple script that will display an jpeg or png image
> using GD.pm (readily available from CPAN)
> 
> I am getting [Wed Sep  3 10:41:37 2003] [notice] child pid 832 exit signal
> Segmentation fault (11) This happens only when the script is loaded in
> mod_perl... In normal perl/apache it works without the segfault.... Any
> Ideas as to why?

Not before you show us the segfault backtrace, unless someone can reproduce 
your problem with the sample script. See:
http://perl.apache.org/bugs/

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html