@mattab opened this Issue on October 23rd 2012 Owner

The error.log on the demo is full of errors causing the server to slow down.


4447-       Warning:</strong> <i>imagecreatetruecolor() [&lt;a href=&<a href='/039'>#039</a>;function.imagecreatetruecolor&<a href='/039'>#039</a>;&gt;function.imagecreatetruecolor&lt;/a&gt;]: Invalid image dimensions</i> in <b>/home/piwik/www/demo.piwik.org/libs/pChart2.1.3/class/pImage.class.php</b> on line <b>93</b>
4723-<br /><br />Backtrace --&gt;<div style="font-family:Courier;font-size:10pt"><br />
4806-<a href='/0'>#0</a>  Piwik_ErrorHandler(...) called at [:]<br />
4854-<a href='/1'>#1</a>  imagecreatetruecolor(...) called at [/home/piwik/www/demo.piwik.org/libs/pChart2.1.3/class/pImage.class.php:93]<br />
4976-<a href='/2'>#2</a>  pImage-&gt;pImage(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph.php:244]<br />
5091-<a href='/3'>#3</a>  Piwik_ImageGraph_StaticGraph-&gt;initpImage(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph.php:264]<br />
5232-<a href='/4'>#4</a>  Piwik_ImageGraph_StaticGraph-&gt;getTextWidthHeight(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph/Exception.php:39]<br />
5390-<a href='/5'>#5</a>  Piwik_ImageGraph_StaticGraph_Exception-&gt;renderGraph(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/API.php:522]<br />
5534-<a href='/6'>#6</a>  Piwik_ImageGraph_API-&gt;get(...) called at [:]<br />
5592-<a href='/7'>#7</a>  call_user_func_array(...) called at [/home/piwik/www/demo.piwik.org/core/API/Proxy.php:190]<br />
5694-<a href='/8'>#8</a>  Piwik_API_Proxy-&gt;call(...) called at [/home/piwik/www/demo.piwik.org/core/API/Request.php:128]<br />
5802-<a href='/9'>#9</a>  Piwik_API_Request-&gt;process(...) called at [/home/piwik/www/demo.piwik.org/plugins/API/Controller.php:27]<br />
5920-<a href='/10'>#10</a>  Piwik_API_Controller-&gt;index(...) called at [:]<br />
5981-<a href='/11'>#11</a>  call_user_func_array(...) called at [/home/piwik/www/demo.piwik.org/core/FrontController.php:138]<br />
6090-<a href='/12'>#12</a>  Piwik_FrontController-&gt;dispatch(...) called at [/home/piwik/www/demo.piwik.org/index.php:53]</div><br />
6203- </pre></div><br />

Another error is

4447-       Warning:</strong> <i>imagecreatetruecolor() [&lt;a href=&<a href='/039'>#039</a>;function.imagecreatetruecolor&<a href='/039'>#039</a>;&gt;function.imagecreatetruecolor&lt;/a&gt;]: Invalid image dimensions</i> in <b>/home/piwik/www/demo.piwik.org/libs/pChart2.1.3/class/pImage.class.php</b> on line <b>93</b>
4723-<br /><br />Backtrace --&gt;<div style="font-family:Courier;font-size:10pt"><br />
4806-<a href='/0'>#0</a>  Piwik_ErrorHandler(...) called at [:]<br />
4854-<a href='/1'>#1</a>  imagecreatetruecolor(...) called at [/home/piwik/www/demo.piwik.org/libs/pChart2.1.3/class/pImage.class.php:93]<br />
4976-<a href='/2'>#2</a>  pImage-&gt;pImage(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph.php:244]<br />
5091-<a href='/3'>#3</a>  Piwik_ImageGraph_StaticGraph-&gt;initpImage(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph.php:264]<br />
5232-<a href='/4'>#4</a>  Piwik_ImageGraph_StaticGraph-&gt;getTextWidthHeight(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/StaticGraph/Exception.php:39]<br />
5390-<a href='/5'>#5</a>  Piwik_ImageGraph_StaticGraph_Exception-&gt;renderGraph(...) called at [/home/piwik/www/demo.piwik.org/plugins/ImageGraph/API.php:522]<br />
5534-<a href='/6'>#6</a>  Piwik_ImageGraph_API-&gt;get(...) called at [:]<br />
5592-<a href='/7'>#7</a>  call_user_func_array(...) called at [/home/piwik/www/demo.piwik.org/core/API/Proxy.php:190]<br />
5694-<a href='/8'>#8</a>  Piwik_API_Proxy-&gt;call(...) called at [/home/piwik/www/demo.piwik.org/core/API/Request.php:128]<br />
5802-<a href='/9'>#9</a>  Piwik_API_Request-&gt;process(...) called at [/home/piwik/www/demo.piwik.org/plugins/API/Controller.php:27]<br />
5920-<a href='/10'>#10</a>  Piwik_API_Controller-&gt;index(...) called at [:]<br />
5981-<a href='/11'>#11</a>  call_user_func_array(...) called at [/home/piwik/www/demo.piwik.org/core/FrontController.php:138]<br />
6090-<a href='/12'>#12</a>  Piwik_FrontController-&gt;dispatch(...) called at [/home/piwik/www/demo.piwik.org/index.php:53]</div><br />
6203- </pre></div><br />

It would be great to resolve these issues since they can cause performance issue on the demo.

@mattab commented on October 24th 2012 Owner

(In [7303]) Fixes #3474

  • sometimes width or height are not defined, in particular when the API fails before the $width and $height are defined in line 216-217 of ImageGraph/API.php
    so we always check the error graph has a width/height set.

Ping Refs #3013

This Issue was closed on October 24th 2012
Powered by GitHub Issue Mirror