View Issue Details

IDProjectCategoryView StatusLast Update
0000613HTML & PERLBug Report - Interfacepublic2007-04-14 21:05
Reporterspider0042 Assigned Toepoximator  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000613: Anime Stats - History Graphs Broken for some anime
Description[ Problem ]

Was trying to view the Status History for 'Fushigi na Koala Blinky'
Anime Page: http://anidb.info/a4208
Stats Link: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=4208

Both History Graphs/Objects do not show up and it complains:
-------------------------------------
XML Parsing Error: syntax error
Location: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=4208&gfx=users
Line Number 1, Column 1:Content-type: text/html
^

-------------------------------------

Other titles that have these issues can be found as 'Additional Information'.
It may be useful to take note of the 'Useful Exception'.

The problem maybe when the graph is being scaled? (see Useful Exception)
Well, probably obvious when you take a look at the code and the samples above.
Additional InformationBroken Graph Examples:
Anime: http://anidb.info/a4928
Stats: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=4928
Anime: http://anidb.info/a2470
Stats: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=2470

Working Graph Example:
Anime: http://anidb.info/a970
Stats: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=970
Eps: 23, Files: 1, Groups: 1, Users: 4 (OK/Works Case)

*** Useful Exception ***
Anime: http://anidb.info/a3472
Stats: http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=3472
(Notice the table was generated at the bottom and that Groups, Files, and Eps are all 1)
TagsNo tags attached.

Activities

spider0042

2007-04-01 03:35

reporter   ~0001222

Heres the real issue:
http://anidb.info/perl-bin/animedb.pl?show=animehist&aid=3472&gfx=files
-----------------------------------------------------
Content-type: text/html

<html><body><h2>ERROR:</h2>
<h4>Illegal division by zero at /usr/local/share/perl/5.8.4/SVG/Graph/Glyph/line.pm line 25.
</h4></body></html>
-----------------------------------------------------

I took a look at SVG Graph for the hell of it:
This is probably it:
sub draw{
   my ($self,@args) = @_;

   my $id = 'n'.sprintf("%07d",int(rand(9999999)));
   my $group = $self->svg->group(id=>"line$id");

   my $xscale = $self->xsize / $self->group->xrange;
   my $yscale = $self->ysize / $self->group->yrange;

So when you pass data such that the x and or y range are 0?... my guess is 0..0 1..1?

(Sorry, I forgot a '/' in my pre tag of the Description. -_- )

Issue History

Date Modified Username Field Change
2007-04-01 03:22 spider0042 New Issue
2007-04-01 03:35 spider0042 Note Added: 0001222
2007-04-01 09:13 epoximator Status new => assigned
2007-04-01 09:13 epoximator Assigned To => epoximator
2007-04-14 21:05 epoximator Status assigned => resolved
2007-04-14 21:05 epoximator Resolution open => fixed