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: 16791
Status: resolved
Priority: 0/
Queue: GDGraph

People
Owner: Nobody in particular
Requestors: banjo [...] users.sourceforge.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.4305
Fixed in: 1.4306



Subject: [PATCH] division by zero in axestype.pm _best_ends
A bug in the GD/Graph/axestype.pm method _best_ends causes divide by zero errors with large data sets and normal or small sized images. Adding a test to ensure the step is not <= 0 avoids the problem. See attached patch. dd -- David Dooling
--- axestype.pm.orig 2005-12-18 23:06:05.000000000 -0600 +++ axestype.pm 2005-12-29 12:21:11.000000000 -0600 @@ -1677,7 +1693,7 @@ for my $step (@step) { - next if ($n != 1) && ($step < $range/$n); # $step too small + next if ($n != 1) && (($step < $range/$n) || $step <= 0); # $step too small my ($nice_min, $nice_max, $fit) = _fit_interval($min, $max, $n, $step);
Just out of curiosity, how large a dataset are you using, to produce this bug? And what architecture are you operating on? The error you describe really oughtn't be possible to demonstrate, so I'm very interested to know how you managed. :-) On Thu Dec 29 13:34:02 2005, guest wrote: Show quoted text
> A bug in the GD/Graph/axestype.pm method _best_ends causes divide by > zero errors with large data sets and normal or small sized images. > Adding a test to ensure the step is not <= 0 avoids the problem. > See attached patch. > > dd
Patch (or its equivalent) included in 1.4306--I'll mark this closed if and when I get that permission from RT.
From: banjo [...] users.sourceforge.net
On Tue Jan 24 23:07:53 2006, BWARFIELD wrote: Show quoted text
> Just out of curiosity, how large a dataset are you using, to produce > this bug? And what > architecture are you operating on? The error you describe really > oughtn't be possible to > demonstrate, so I'm very interested to know how you managed. :-)
Sorry I did not get back to you on this. I was filing the bug report for someone else and they did not get back to me before you resolved the ticket (and still have not). I hope this does not reopen the ticket. dd