Bug #44278

High memory consumption of Debugger::renderObjectDump() prevents display of Exceptions

Added by Benno Weinzierl almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Must have
Category:
Error
Start date:
2013-01-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:
easy

Description

When an arbitrary Exception is thrown i get a "Allowed memory Limit"-Error instead of the Flow Exception-Errormessage.

This seems to occure because \Doctrine\Common\Util\Debug::export($object, 12) is called with 12 nesting levels.
In TYPO3\Flow\Error\Debugger:

        ....
    static protected function renderObjectDump($object, $level, $renderProperties = TRUE, $plaintext = FALSE, $ansiColors = FALSE) {
        $dump = '';
        $scope = '';
        $additionalAttributes = '';

        if ($object instanceof \Doctrine\Common\Collections\Collection) {
            return self::renderArrayDump(\Doctrine\Common\Util\Debug::export($object, 12), $level, $plaintext, $ansiColors);
        }
        ...

if i change the 12 to 6 for example it works.
Sould this not be at least configurable via Settings.yaml?


Related issues

Has duplicate TYPO3.Flow - Bug #30714: \TYPO3\FLOW3\var_dump() memory use causes fatal error debugging objects.Closed2011-10-10

Actions
#1

Updated by Bastian Waidelich almost 8 years ago

  • Priority changed from Should have to Could have

I had the same issue and your change fixed it for me.
But IMO we should rather "fix" the object dumper to avoid recursive loops and maybe a check for memory consumption..
It doesn't make sense to make this configurable I think, because it greatly depends on your objects so this should be cleverer itself

#2

Updated by Bastian Waidelich almost 8 years ago

  • Priority changed from Could have to Should have
#3

Updated by Martin Br├╝ggemann almost 8 years ago

  • Priority changed from Should have to Must have

THIS IS A BIG TYPO3 FLOW SHOWSTOPPER FOR BEGINNERS (not me) ;) We should lower the recursion loops from 12 to 3-6!!!

#4

Updated by Karsten Dambekalns almost 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
#5

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17686

#6

Updated by Karsten Dambekalns almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/17688

#8

Updated by Karsten Dambekalns almost 8 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF