PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_Graph » Bug #7557

drawing more than 500 smooth lines will crash the program.

Details

Submitted2006-05-04 16:18 UTC
Fromfanyang32 at hotmail dot com
StatusBogus
PackageImage_Graph
PHP Version5.0.4
OSredhat redora core
Roadmaps(Not assigned)

Comments

[2006-05-04 16:18 UTC] fanyang32 at hotmail dot com

Description:
------------
Hi,

I was using image_graph package to plot about 555 smooth-line in one plot area, but the program crashed.

In order to duplicated my problem what I encountered, I used the example - plot_line_smooth.php (it's under /usr/share/pear/doc/Image_Graph/docs/examples/ on my machine) which comes with image_graph installation.

I added a loop to the original code, after enlarge the loop to 800 or more, the program would crash.

Fan

Test script:
---------------
$i = 0; //-- I added
while($i<1000){ //-- I added
$Dataset =& Image_Graph::factory('random', array(10,2,15, true));
// create the 1st plot as smoothed area chart using the 1st dataset
$Plot =& $Plotarea->addNew('Image_Graph_Plot_Smoothed_Line', array(&$Dataset));

// set a line color
$Plot->setLineColor('red');
$i++; //-- I added
}

Expected result:
----------------
the program crashed, outputed nothing.

Actual result:
--------------
drawing lines as many as user wanted or throwing exception to tell user program has trouble.