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

Bug #3965 Unable to dump big size Object
Submitted: 2005-03-26 10:36 UTC
From: tibolists at free dot fr Assigned: fredericpoeydomenge
Status: Closed Package: Var_Dump
PHP Version: 4.3.8 OS: Linux Mandrake 10.1
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 : 49 + 44 = ?

 
 [2005-03-26 10:36 UTC] tibolists at free dot fr
Description: ------------ Hi, I do use HTML_QuickForm_Controller. I did a controller with 3 pages and input fields in each of the pages. if I print_r($mycontroller), it's print out. if I var_dump($mycontroller) it's print out. if I Var_Dump::display($mycontroller) nothing happend, the execution stop and do not output anything. Doing the same in the same source code, with a smaller variable outputs the good result well formatted. I can say that there is some HTML content in my input fields value in the pages of the controller. But well, what should be the problem, as even if I echo "something"; before the call of Var_Dump::display(), nothing output, it's figure out that the code fail somewhere in the Var_Dump class. Thanks Olivier Reproduce code: --------------- //many code to construct my controller and pages and inputs and setdefault value for input. the controller is named $tabbed. Var_Dump::displayInit(array('display_mode' => HTML4_Table')); echo "displaying the dump<br/>"; $str =Var_Dump::display($tabbed, true); echo $str; //Really nothing output

Comments

 [2005-04-12 11:43 UTC] fredericpoeydomenge
Hi Olivier, Please could you be more precise about your problem "//many code to construct my controller and pages and inputs and setdefault value for input. the controller is named $tabbed." does not help me to reproduce the bug as I've no clue about the object you are trying to dump. Could you send me a serialize($yourobject), or at least check out the following script : echo memory_get_usage(); . "\n"; // code to construct your object echo memory_get_usage() . "\n"; If your object is taking too much memory, then perhaps the problem does not come from Var_Dump itself.
 [2005-04-12 12:55 UTC] tibolists at free dot fr
Hi, I did the echo memory usage as you ask me to. I did 2 different test, with and without the call of Var_Dump::Display() Test 1: * echo of memory usage : 42704936 * creation of objects * echo of memory usage : 43288424 Test 2: * echo of memory usage : 42704936 * creation of objects * Call of Var_dump::Display($tabbed): => error: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 37035563 bytes) in /usr/share/pear/Var_Dump.php on line 195 * echo of memory usage : does not display do to error before... The problem seems to be in the Var_Dump::Display(). the code: Var_Dump::displayInit(array('display_mode' => 'HTML4_Table')); $str = Var_Dump::display($tabbed, true); // Failed echo memory_get_usage(); $tabbed->run(); Hope that help you. Rgs, Olivier Ps: it's working well with smaller object, the problem seems to be a recursion test problem in Var_Dump...
 [2005-04-12 17:43 UTC] fredericpoeydomenge
That's not a recursion test problem, because Var_Dump rely on var_dump() function to obtain the dump of the object, and you told me that var_dump() is working in your case. That's obviously something to do with : 1- the size of the object 2- the renderer used (see PATH2PEAR/data/Var_Dump/memory-usage.txt) With HTML4_Table renderer, the generated HTML code is about 6x the size of the initial var_dump() string (e.g. an object resulting in a 1Mo var_dump() string, will produces an HTML code that is about 6Mo in memory) If you are trying to dump an object with this renderer, you will need a huge amount of memory :( Could you please check the following code : echo memory_get_usage().' / '; // Object creation echo memory_get_usage().' / '; ob_start(); var_dump($tabbed); $result = ob_get_contents(); ob_end_clean(); echo strlen($result).' / '; echo strlen(serialize($result)); Or to dump the $tabbed object with another renderer : Var_Dump::displayInit(array('display_mode' => 'Text')); Regards.
 [2005-08-30 09:50 UTC] fredericpoeydomenge
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.