Guest
11 Feb 2013 18:06

Hi

Analysing the properties of the object ...

var_dump(get_object_vars($item->fields_by_id[9]));

... results in a memory allocation >256M even if the field is type "text".

Maybe some code creates a memory leak here.

to access at least the keys try:

array_keys((array)$item->fields_by_id[9]);

and call the needed value's individually.

to reproduce:

J2.5 Cobalt 7 latest

open active template in editor and paste

var_dump(get_object_vars($item->fields_by_id[ID]));

where id needs to reflect a real object. save & reload, check error_log at Joomla root.

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
12 Feb 2013 03:53

Tell me what is type of field this 9.


Guest
12 Feb 2013 04:22

Hi Sergey

even if the field is type "text".


Sergey
Total posts: 13,748
12 Feb 2013 06:20

Then 256M is a total for current PHP script run. It needs to be investigated. Where do you have a lot of data?


Guest
12 Feb 2013 07:16

there is no data. only one field "text" with 3letters. >256 memory for a var_dump of object without big additional data most likely is to be found in inf.loop/coding of that object. you could split the array in half than in quarter etc. to track down the error source. can you reproduce the error or is it ok for you?


Sergey
Total posts: 13,748
12 Feb 2013 07:21

How do you get 256M?


Sergey
Total posts: 13,748
12 Feb 2013 07:22

Please add screenshot where you see 256M


Guest
12 Feb 2013 08:17

PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 245637121 bytes) in /home/joomla.it/joomla/components/com_cobalt/views/record/tmpl/default_record_blog.php on line 143

line 143 is var_dump(get_object_vars($item->fields_by_id[9]));

which is of type "text"


Sergey
Total posts: 13,748
12 Feb 2013 22:49

I think you ned to profile your site by using xdebug or zend debuger and see what takes all that memory. Otherwise I have no idea how find out the reason.

Powered by Cobalt