Skip Menu |

This queue is for tickets about the GDGraph CPAN distribution.

Maintainer(s)' notes

There are plenty of good ideas of what people can do published here on the queue. Turning a patch from the tracker into a pull request is not one of them. In order to get maintainers' attention way more quickier, PR should have at least a sample included. We know it's hard to test images generating software, but it doesn't mean we can not test numbers produced by intermediate algorithms used to generate these images, so either a test or a sample.

Report information
The Basics
Id: 4177
Status: resolved
Priority: 1/
Queue: GDGraph

People
Owner: bwarfield [...] cpan.org
Requestors: postminister [...] gmx.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.43
Fixed in: 1.4308



Subject: undef values in charts lead to errors while drawing accent lines
I got the ppm distribution 1.35, but the code in area.pm is identical to the current version 1.43! When plotting area graphs with some undef values in the data I experienced errors like these: [Tue Oct 21 08:48:03 2003] (eval 224): Use of uninitialized value in subroutine entry at c:/Perl/site/lib/GD/Graph/area.pm line 105. Looking more closely at the code in area.pm I find 97 my $value = $values[$i]; 98 ## XXX Why don't I need this line? 99 ## next unless defined $value; 100 101 my ($x, $y) = $poly->getPt($i); 102 my $bottom = $bottom[$i]->[1]; 103 104 $self->{graph}->dashedLine($x, $y, $x, $bottom, $brci); By adding the following line right before the dashedLine call --> next unless (defined $x) and (defined $y) and (defined $bottom); I can prevent these errors to occur!! So, this should be easy to fix - you try to call dashedLine with undef values and that causes the problem!
Thanks for pointing this out—it'll be fixed in the next release.