Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #8049 Timeout when range in ODO graph is smaller than some value
Submitted: 2006-06-28 08:46 UTC
From: filipga at gmail dot com Assigned:
Status: Open Package: Image_Graph (version 0.7.2)
PHP Version: 4.3.9 OS: Linux (2.6.9 ?)
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 39 + 39 = ?

 
 [2006-06-28 08:46 UTC] filipga at gmail dot com (filipga)
Description: ------------ Odo graph timeouts when range is smallar than some magic value (in my example the magic value is 45). For example when range for the ODO graph is between 40 and 85 graph is generated successfully. When the range is between 40 and 84 the script timeouts (see bellow the error message). Run the test script and you will get an error like this: Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865 (file name and line number changes) When I play with setAngles setting (e.g. $Plot->setAngles(135, 300)) the magic value when the script timeouts changes somehow. I checked this problem with ImageGraph version 0.7.2 (alpha) as well as with CVS version a few days old - with same results. Test script: --------------- <?php include 'Image/Graph.php'; $CURRENT = 50; $MIN_RANGE = 40; $MAX_RANGE = 84; // create the graph $driver=& Image_Canvas::factory('png',array('width'=>350, 'height'=>300, 'antialias' => 'native')); $Graph = & Image_Graph::factory('graph', $driver); $Graph->add($Plotarea = Image_Graph::factory('plotarea')); /***************************Arrows************************/ $Arrows = & Image_Graph::factory('dataset'); $Arrows->addPoint('Cur.', $CURRENT, 'current'); /**************************PARAMATERS for PLOT*******************/ $Plot =& $Plotarea->addNew('Image_Graph_Plot_Odo',$Arrows); $Plot->setRange($MIN_RANGE, $MAX_RANGE); /**************************RANGE*******************/ // create the dataset $Plot->addRangeMarker($MIN_RANGE, $MAX_RANGE); $Graph->done(); ?> Expected result: ---------------- Odo graph is drawn. When you change the range ($MAX_RANGE - $MIN_RANGE) >= 45 (e.g. $MAX_RANGE = 85;) everything works fine - ODO graph is drawn. Actual result: -------------- Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/pear/Image/Canvas/GD.php on line 865 (file name and line number changes)

Comments

 [2008-01-15 08:02 UTC] oscargrecom (Oscar Vries)
I have made a change in 'Image/Graph/Plot/Odo.php' on line 382: - $step = (int) ($this->_totalY / $this->_deg_width * 6); + $step = ceil(($this->_totalY / $this->_deg_width * 6));