View Issue Details

IDProjectCategoryView StatusLast Update
0004061OXID eShop (all versions)2. ----- eShop backend (admin) -----public2012-11-23 14:24
ReporterWBL_BjoernLange Assigned To 
PriorityhighSeveritycrashReproducibilitysometimes
Status resolvedResolutionunable to reproduce 
Product Version4.6.0 revision 44406 
Summary0004061: "Infinite loop" with module of oxmodule
DescriptionAfter enabling a module which overrides oxmodule i got an infinite loop in the unit tests and in the module backend. After i changed the oxmodule-Extension from "extends *_parent" to "extends oxModule", most things went back to normal.

I did search for the exact location, but this is a part of my error log.

Fatal error: Maximum function nesting level of '100' reached, aborting! in /var/www/oxid460/unittests/unit/test_utils.php on line 536

Call Stack:
    0.0008 324872 1. {main}() /var/www/PHPUnit/phpunit.php:0
    0.0703 4643384 2. PHPUnit_TextUI_Command::main() /var/www/PHPUnit/phpunit.php:52
    0.0703 4643856 3. PHPUnit_TextUI_Command->run() /var/www/PHPUnit/PHPUnit/TextUI/Command.php:147
    8.2496 8816364 4. PHPUnit_Runner_BaseTestRunner->getTest() /var/www/PHPUnit/PHPUnit/TextUI/Command.php:168
    8.2501 8836292 5. PHPUnit_Framework_TestSuite->addTestFiles() /var/www/PHPUnit/PHPUnit/Runner/BaseTestRunner.php:104
    8.2905 9743356 6. PHPUnit_Framework_TestSuite->addTestFile() /var/www/PHPUnit/PHPUnit/Framework/TestSuite.php:470
    8.2912 9743900 7. PHPUnit_Util_Fileloader::checkAndLoad() /var/www/PHPUnit/PHPUnit/Framework/TestSuite.php:413
    8.2912 9743900 8. PHPUnit_Util_Fileloader::load() /var/www/PHPUnit/PHPUnit/Util/Fileloader.php:91
    8.2921 9889184 9. include_once('XXX') /var/www/PHPUnit/PHPUnit/Util/Fileloader.php:113
    8.2922 9893936 10. require('XXX') /var/www/oxid460/unittests/unit/modules/WBL/Tracker/Adapter/LoaderTest.php:13
    8.2922 9894252 11. oxAutoload() /var/www/oxid460/http/core/oxfunctions.php:0
    8.2924 9895356 12. oxNew() /var/www/oxid460/http/core/oxfunctions.php:98
    8.2924 9896084 13. call_user_func_array() /var/www/oxid460/http/core/oxfunctions.php:316
    8.2924 9896336 14. oxUtilsObject->oxNew() /var/www/oxid460/http/core/oxfunctions.php:0
    8.2924 9896672 15. oxUtilsObject->getClassName() /var/www/oxid460/http/core/oxutilsobject.php:112
    8.2927 9897376 16. oxUtilsObject->_makeSafeModuleClassParents() /var/www/oxid460/http/core/oxutilsobject.php:274
    8.2938 10013744 17. class_exists() /var/www/oxid460/http/core/oxutilsobject.php:401
    8.2938 10014040 18. oxAutoload() /var/www/oxid460/http/core/oxfunctions.php:0
    8.2939 10015104 19. oxNew() /var/www/oxid460/http/core/oxfunctions.php:98
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

vaidas.matulevicius

2012-05-28 13:15

reporter   ~0006688

Hi, we extended oxModule class with new module, but we can't get any error messages. So please explain more detailed how You did that, or even send us Your class code which caused errors.

vaidas.matulevicius

2012-05-28 13:16

reporter   ~0006689

Reminder sent to: WBL_BjoernLange

Hi, please check notes at https://bugs.oxid-esales.com/bug_reminder_page.php?bug_id=4061

WBL_BjoernLange

2012-06-27 18:01

reporter   ~0007003

Last edited: 2012-06-27 19:54

I got more insight, where this bug comes from. It is not reproducable in OXID < 4.6.0 but after that. I use <https://github.com/WBL-BjoernLange/WBL_Modules_Autoloader/> to get my module files. The autoloader is included through the modules/functions.php, which is loaded in the normal shop core prior the core/oxfunctions.php. But the unittests do not load the modules/functions.php. To get my autoloader and modules working, i need to include the modules/functions.php manually in my testcase, otherwise i must change oxid files. But for example, since oxid 4.6.0 an oxsession module is loaded (through the bootstrap.php), before my testcase can include the modules/functions.php. If I include the modules/functions.php in test_utils.php, like the shop front before core/oxfunctions.php is included, the tests are working.
Is there a way that you implement a more realistic approach using the modules/functions.php in your unittests? Or maybe, remove the difference in the unittest bootstrapping between oxid 4.5 and 4.6?

alexwichti

2012-07-12 11:11

reporter   ~0007076

Getting similar behaviour when overriding OxUtils.

Top from call stack:

Fatal error: Maximum function nesting level of '100' reached, aborting! in [...]\core\oxfunctions.php on line 312
Call Stack
# Time Memory Function Location
1 0.0004 141064 {main}( ) ..\index.php:0
2 0.0010 153112 require_once( '[...]\index.php' ) ..\index.php:40
3 0.0071 464312 oxConfig::getInstance( ) ..\index.php:83
4 0.0071 466744 oxConfig->init( ) ..\oxconfig.php:525
5 1.0601 1403728 oxSession->start( ) ..\oxconfig.php:473
6 1.0614 1470480 oxSession->_isSwappedClient( ) ..\oxsession.php:277
7 1.0661 1855152 oxUtils::getInstance( ) ..\oxsession.php:861
8 1.0661 1855280 oxNew( ) ..\oxutils.php:108
9 1.0661 1855792 call_user_func_array ( ) ..\oxfunctions.php:314
10 1.0661 1855976 oxUtilsObject->oxNew( ) ..\oxfunctions.php:314
11 1.0661 1856208 oxUtilsObject->getClassName( ) ..\oxutilsobject.php:112
12 1.0662 1857120 oxUtilsObject->_makeSafeModuleClassParents( ) ..\oxutilsobject.php:274
13 1.0663 1877136 class_exists ( ) ..\oxutilsobject.php:401
14 1.0664 1877352 oxAutoload( ) ..\oxutilsobject.php:0
15 1.0678 1937096 oxUtilsObject->getClassName( ) ..\oxfunctions.php:129
16 1.0679 1937960 oxUtilsObject->_makeSafeModuleClassParents( ) ..\oxutilsobject.php:274
17 1.0680 1938504 oxUtilsObject->_disableModule( ) ..\oxutilsobject.php:403
18 1.0695 2055400 oxModule->deactivate( ) ..\oxutilsobject.php:354
19 1.0706 2056296 oxModule->_resetCache( ) ..\oxmodule.php:463
20 1.0706 2056344 oxUtils::getInstance( ) ..\oxmodule.php:492
21 1.0706 2056392 oxNew( )
[...]

Linas Kukulskis

2012-11-23 14:24

reporter   ~0007968

sorry we can reproduce this error; its seems that is something wrong with your code. if you provide the source code of your extended class (oxmodule_parent) so we will debug more deeply. (of course reopen the bug)