Subject: | illegal division by zero |
Date: | Tue, 1 Aug 2006 18:11:21 +0200 |
To: | bug-GDGraph [...] rt.cpan.org |
From: | Raffaele Conte <raf [...] ifc.cnr.it> |
Hy,
I'm trying to configure the Statistics3 module for Request Tracker
but I'm not able to show the charts. When I try to load the picture
in a separate window, the browser displays the error:
error:
Illegal division by zero at /usr/lib/perl5/site_perl/5.8.8/GD/Graph/
axestype.pm line 2014.
context:
...
2010:
$self->{lg_cols} = int($width/$self->{lg_el_width});
2011:
2012:
$self->{lg_cols} = _min($self->{lg_cols}, $num);
2013:
2014:
$self->{lg_rows} =
2015:
int($num / $self->{lg_cols}) + (($num % $self->{lg_cols}) ? 1 : 0);
2016:
2017:
$self->{lg_x_size} = $self->{lg_cols} * $self->{lg_el_width};
2018:
$self->{lg_y_size} = $self->{lg_rows} * $self->{lg_el_height};
...
code stack:
/usr/lib/perl5/site_perl/5.8.8/GD/Graph/axestype.pm:2014
/usr/lib/perl5/site_perl/5.8.8/GD/Graph/axestype.pm:228
/var/www/rt3/RTx/Statistics/CallsQueueDay/Elements/Chart:3
/var/www/rt3/autohandler:215
raw error
Illegal division by zero at /usr/lib/perl5/site_perl/5.8.8/GD/Graph/
axestype.pm line 2014.
Trace begun at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/
Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Illegal division by zero
at /usr/lib/perl5/site_perl/5.8.8/GD/Graph/axestype.pm line 2014.^J')
called at /usr/lib/perl5/site_perl/5.8.8/GD/Graph/axestype.pm line 2014
GD::Graph::axestype::setup_legend('GD::Graph::lines=HASH(0xbc59e34)')
called at /usr/lib/perl5/site_perl/5.8.8/GD/Graph/axestype.pm line 228
GD::Graph::axestype::plot('GD::Graph::lines=HASH(0xbc59e34)', 'ARRAY
(0xae066cc)') called at /var/www/rt3/RTx/Statistics/CallsQueueDay/
Elements/Chart line 3
HTML::Mason::Commands::__ANON__('x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH
(0xbbe744c)', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Request.pm line 1251
eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
line 1245
HTML::Mason::Request::comp(undef, undef, 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Request.pm line 914
HTML::Mason::Request::call_next
('HTML::Mason::Request::ApacheHandler=HASH(0xba421a4)', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /var/www/rt3/
autohandler line 215
HTML::Mason::Commands::__ANON__('x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH
(0xbbf1254)', 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Request.pm line 1246
eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
line 1245
HTML::Mason::Request::comp(undef, undef, undef, 'x_labels',
'Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun,Mon,Tue,"data1=0,0,0,0,0,0,0,0,0,0,0"da
ta2=0,0,0,0,0,0,0,0,0,0,0"data3=0,0,0,0,0,0,0,0,0,0,0"set_legend=Created
,Resolved,Deleted" ALT="Result Graph"') called at /usr/lib/perl5/
vendor_perl/5.8.7/HTML/Mason/Request.pm line 459
eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
line 459
eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
line 411
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH
(0xba421a4)') called at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/
ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec
('HTML::Mason::Request::ApacheHandler=HASH(0xba421a4)') called at /
usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/ApacheHandler.pm line 826
HTML::Mason::ApacheHandler::handle_request
('HTML::Mason::ApacheHandler=HASH(0xabe3518)',
'Apache2::RequestRec=SCALAR(0xaddb52c)') called at /usr/sbin/
webmux.pl line 123
eval {...} at /usr/sbin/webmux.pl line 123
RT::Mason::handler('Apache2::RequestRec=SCALAR(0xaddb52c)') called at
-e line 0
eval {...} at -e line 0
It run on a Fedora Core 5 with:
httpd-2.2.2-1.0
gd-2.0.33-6.2
gd-devel-2.0.33-6.2
libpng-1.2.8-2.2.1
libpng-devel-1.2.8-2.2.1
libjpeg-6b-36.2.1
libjpeg-devel-6b-36.2.1
freetype-2.1.10-5.2.1
freetype-devel-2.1.10-5.2.1
zlib-devel-1.2.3-1.2.1
zlib-1.2.3-1.2.1
and with GD and GD::Graph installed by CPAN:
Show quoted text
cpan> i GD
Strange distribution name [GD]
Module id = GD
DESCRIPTION Interface to Gd Graphics Library
CPAN_USERID LDS (Lincoln D. Stein <lstein@cshl.edu>)
CPAN_VERSION 2.34
CPAN_FILE L/LD/LDS/GD-2.34.tar.gz
UPLOAD_DATE 2006-06-01
DSLIP_STATUS MdcOp (mature,developer,C,object-oriented,Standard-
Perl)
MANPAGE GD.pm - Interface to Gd Graphics Library
INST_FILE /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-
multi/GD.pm
INST_VERSION 2.34
Show quoted textcpan> i GD::Graph
Strange distribution name [GD::Graph]
Module id = GD::Graph
DESCRIPTION Create charts using GD
CPAN_USERID MVERB (Martien Verbruggen <mgjv@tradingpost.com.au>)
CPAN_VERSION 1.4308
CPAN_FILE B/BW/BWARFIELD/GDGraph-1.4308.tar.gz
UPLOAD_DATE 2006-05-18
DSLIP_STATUS RdpOp (released,developer,perl,object-
oriented,Standard-Perl)
MANPAGE GD::Graph - Graph Plotting Module for Perl 5
INST_FILE /usr/lib/perl5/site_perl/5.8.8/GD/Graph.pm
INST_VERSION 1.4308
Where is the problem?
thanks in advance
Raffaele Conte
Message body is not shown because it is too large.