Following error appears when run simpletest for Mollom:

Fatal error: Maximum function nesting level of '400' reached, aborting! in tests/mollom.test on line 83
CommentFileSizeAuthor
#10 mollom.test.patch544 byteskenorb

Comments

kenorb’s picture

 

( ! ) Fatal error: Maximum function nesting level of '400' reached, aborting! in mollom/tests/mollom.test on line 83
Call Stack
# Time Memory Function Location
1 0.0002 325532 {main}( ) ../index.php:0
7 2.1767 28132308 _batch_process( array ('sets' => array (0 => array (...)), 'current_set' => 0, 'progressive' => TRUE, 'url' => 'batch', 'source_page' => 'admin/build/testing', 'redirect' => 'admin/build/testing/results/88', 'id' => '72', 'error_message' => 'Please continue to <a href="/batch?id=72&amp;op=finished">the error page</a>', 'running' => TRUE) ) ../batch.inc:147
10 4.0158 40912280 DrupalTestCase->run( ) ../simpletest.module:214
11 4.0162 40924176 MollomWebTestCase->setUp( ) ../drupal_web_test_case.php:427
12 4.0162 40924948 call_user_func_array ( array (0 => class MollomAccessTestCase { protected $admin_user = NULL; protected $web_user = NULL; protected $fallback_message = 'The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.'; protected $spam_message = 'Your submission has triggered the spam filter and will not be accepted.'; protected $incorrect_message = 'The word verification was not completed correctly. Please complete this new word verification and try again.'; protected $unsure_message = 'To complete this form, please complete the word verification below.'; protected $public_key = ''; protected $private_key = ''; protected $is_reseller = FALSE; protected $url = NULL; protected $curlHandle = NULL; protected $headers = NULL; protected $content = NULL; protected $plainTextContent = NULL; protected $elements = NULL; protected $loggedInUser = FALSE; protected $cookieFile = NULL; protected $additionalCurlOptions = array (...); protected $originalUser = NULL; protected $httpauth_credentials = NULL; protected $session_name = NULL; protected $session_id = NULL; protected $testId = '88'; protected $originalPrefix = NULL; protected $originalFileDirectory = NULL; protected $timeLimit = 180; public $results = array (...); protected $assertions = array (...); protected $skipClasses = array (...); public $messages = array (...) }, 1 => 'parent::setUp'), array (0 => 'mollom', 1 => 'dblog') ) ../mollom.test:98
13 4.0162 40925168 MollomWebTestCase->setUp( 'mollom', 'dblog' ) ../mollom.test:0
14 4.0163 40925920 call_user_func_array ( array (0 => class MollomAccessTestCase { protected $admin_user = NULL; protected $web_user = NULL; protected $fallback_message = 'The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.'; protected $spam_message = 'Your submission has triggered the spam filter and will not be accepted.'; protected $incorrect_message = 'The word verification was not completed correctly. Please complete this new word verification and try again.'; protected $unsure_message = 'To complete this form, please complete the word verification below.'; protected $public_key = ''; protected $private_key = ''; protected $is_reseller = FALSE; protected $url = NULL; protected $curlHandle = NULL; protected $headers = NULL; protected $content = NULL; protected $plainTextContent = NULL; protected $elements = NULL; protected $loggedInUser = FALSE; protected $cookieFile = NULL; protected $additionalCurlOptions = array (...); protected $originalUser = NULL; protected $httpauth_credentials = NULL; protected $session_name = NULL; protected $session_id = NULL; protected $testId = '88'; protected $originalPrefix = NULL; protected $originalFileDirectory = NULL; protected $timeLimit = 180; public $results = array (...); protected $assertions = array (...); protected $skipClasses = array (...); public $messages = array (...) }, 1 => 'parent::setUp'), array (0 => 'mollom', 1 => 'dblog', 2 => 'mollom', 3 => 'dblog') ) ../mollom.test:98
15 4.0163 40926236 MollomWebTestCase->setUp( 'mollom', 'dblog', 'mollom', 'dblog' ) ../mollom.test:0
210 4.0229 42473936 call_user_func_array ( array (0 => class MollomAccessTestCase { protected $admin_user = NULL; protected $web_user = NULL; protected $fallback_message = 'The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.'; protected $spam_message = 'Your submission has triggered the spam filter and will not be accepted.'; protected $incorrect_message = 'The word verification was not completed correctly. Please complete this new word verification and try again.'; protected $unsure_message = 'To complete this form, please complete the word verification below.'; protected $public_key = ''; protected $private_key = ''; protected $is_reseller = FALSE; protected $url = NULL; protected $curlHandle = NULL; protected $headers = NULL; protected $content = NULL; protected $plainTextContent = NULL; protected $elements = NULL; protected $loggedInUser = FALSE; protected $cookieFile = NULL; protected $additionalCurlOptions = array (...); protected $originalUser = NULL; protected $httpauth_credentials = NULL; protected $session_name = NULL; protected $session_id = NULL; protected $testId = '88'; protected $originalPrefix = NULL; protected $originalFileDirectory = NULL; protected $timeLimit = 180; public $results = array (...); protected $assertions = array (...); protected $skipClasses = array (...); public $messages = array (...) }, 1 => 'parent::setUp'), array (0 => 'mollom', 1 => 'dblog', 2 => 'mollom', 3 => 'dblog', 4 => 'mollom', 5 => 'dblog', 6 => 'mollom', 7 => 'dblog', 8 => 'mollom', 9 => 'dblog', 10 => 'mollom', 11 => 'dblog', 12 => 'mollom', 13 => 'dblog', 14 => 'mollom', 15 => 'dblog', 16 => 'mollom', 17 => 'dblog', 18 => 'mollom', 19 => 'dblog', 20 => 'mollom', 21 => 'dblog', 22 => 'mollom', 23 => 'dblog', 24 => 'mollom', 25 => 'dblog', 26 => 'mollom', 27 => 'dblog', 28 => 'mollom', 29 => 'dblog', 30 => 'mollom', 31 => 'dblog', 32 => 'mollom', 33 => 'dblog', 34 => 'mollom', 35 => 'dblog', 36 => 'mollom', 37 => 'dblog', 38 => 'mollom', 39 => 'dblog', 40 => 'mollom', 41 => 'dblog', 42 => 'mollom', 43 => 'dblog', 44 => 'mollom', 45 => 'dblog', 46 => 'mollom', 47 => 'dblog', 48 => 'mollom', 49 => 'dblog', 50 => 'mollom', 51 => 'dblog', 52 => 'mollom', 53 => 'dblog', 54 => 'mollom', 55 => 'dblog', 56 => 'mollom', 57 => 'dblog', 58 => 'mollom', 59 => 'dblog', 60 => 'mollom', 61 => 'dblog', 62 => 'mollom', 63 => 'dblog', 64 => 'mollom', 65 => 'dblog', 66 => 'mollom', 67 => 'dblog', 68 => 'mollom', 69 => 'dblog', 70 => 'mollom', 71 => 'dblog', 72 => 'mollom', 73 => 'dblog', 74 => 'mollom', 75 => 'dblog', 76 => 'mollom', 77 => 'dblog', 78 => 'mollom', 79 => 'dblog', 80 => 'mollom', 81 => 'dblog', 82 => 'mollom', 83 => 'dblog', 84 => 'mollom', 85 => 'dblog', 86 => 'mollom', 87 => 'dblog', 88 => 'mollom', 89 => 'dblog', 90 => 'mollom', 91 => 'dblog', 92 => 'mollom', 93 => 'dblog', 94 => 'mollom', 95 => 'dblog', 96 => 'mollom', 97 => 'dblog', 98 => 'mollom', 99 => 'dblog', 100 => 'mollom', 101 => 'dblog', 102 => 'mollom', 103 => 'dblog', 104 => 'mollom', 105 => 'dblog', 106 => 'mollom', 107 => 'dblog', 108 => 'mollom', 109 => 'dblog', 110 => 'mollom', 111 => 'dblog', 112 => 'mollom', 113 => 'dblog', 114 => 'mollom', 115 => 'dblog', 116 => 'mollom', 117 => 'dblog', 118 => 'mollom', 119 => 'dblog', 120 => 'mollom', 121 => 'dblog', 122 => 'mollom', 123 => 'dblog', 124 => 'mollom', 125 => 'dblog', 126 => 'mollom', 127 => 'dblog', 128 => 'mollom', 129 => 'dblog', 130 => 'mollom', 131 => 'dblog', 132 => 'mollom', 133 => 'dblog', 134 => 'mollom', 135 => 'dblog', 136 => 'mollom', 137 => 'dblog', 138 => 'mollom', 139 => 'dblog', 140 => 'mollom', 141 => 'dblog', 142 => 'mollom', 143 => 'dblog', 144 => 'mollom', 145 => 'dblog', 146 => 'mollom', 147 => 'dblog', 148 => 'mollom', 149 => 'dblog', 150 => 'mollom', 151 => 'dblog', 152 => 'mollom', 153 => 'dblog', 154 => 'mollom', 155 => 'dblog', 156 => 'mollom', 157 => 'dblog', 158 => 'mollom', 159 => 'dblog', 160 => 'mollom', 161 => 'dblog', 162 => 'mollom', 163 => 'dblog', 164 => 'mollom', 165 => 'dblog', 166 => 'mollom', 167 => 'dblog', 168 => 'mollom', 169 => 'dblog', 170 => 'mollom', 171 => 'dblog', 172 => 'mollom', 173 => 'dblog', 174 => 'mollom', 175 => 'dblog', 176 => 'mollom', 177 => 'dblog', 178 => 'mollom', 179 => 'dblog', 180 => 'mollom', 181 => 'dblog', 182 => 'mollom', 183 => 'dblog', 184 => 'mollom', 185 => 'dblog', 186 => 'mollom', 187 => 'dblog', 188 => 'mollom', 189 => 'dblog', 190 => 'mollom', 191 => 'dblog', 192 => 'mollom', 193 => 'dblog', 194 => 'mollom', 195 => 'dblog', 196 => 'mollom', 197 => 'dblog', 198 => 'mollom', 199 => 'dblog') ) ../mollom.test:98
211 4.0230 42484652 MollomWebTestCase->setUp( 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog', 'mollom', 'dblog' ) ../mollom.test:0
212 4.0231 42503820 call_user_func_array ( array (0 => class MollomAccessTestCase { protected $admin_user = NULL; protected $web_user = NULL; protected $fallback_message = 'The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.'; protected $spam_message = 'Your submission has triggered the spam filter and will not be accepted.'; protected $incorrect_message = 'The word verification was not completed correctly. Please complete this new word verification and try again.'; protected $unsure_message = 'To complete this form, please complete the word verification below.'; protected $public_key = ''; protected $private_key = ''; protected $is_reseller = FALSE; protected $url = NULL; protected $curlHandle = NULL; protected $headers = NULL; protected $content = NULL; protected $plainTextContent = NULL; protected $elements = NULL; protected $loggedInUser = FALSE; protected $cookieFile = NULL; protected $additionalCurlOptions = array (...); protected $originalUser = NULL; protected $httpauth_credentials = NULL; protected $session_name = NULL; protected $session_id = NULL; protected $testId = '88'; protected $originalPrefix = NULL; protected $originalFileDirectory = NULL; protected $timeLimit = 180; public $results = array (...); protected $assertions = array (...); protected $skipClasses = array (...); public $messages = array (...) }, 1 => 'parent::setUp'), array (0 => 'mollom', 1 => 'dblog', 2 => 'mollom', 3 => 'dblog', 4 => 'mollom', 5 => 'dblog', 6 => 'mollom', 7 => 'dblog', 8 => 'mollom', 9 => 'dblog', 10 => 'mollom', 11 => 'dblog', 12 => 'mollom', 13 => 'dblog', 14 => 'mollom', 15 => 'dblog', 16 => 'mollom', 17 => 'dblog', 18 => 'mollom', 19 => 'dblog', 20 => 'mollom', 21 => 'dblog', 22 => 'mollom', 23 => 'dblog', 24 => 'mollom', 25 => 'dblog', 26 => 'mollom', 27 => 'dblog', 28 => 'mollom', 29 => 'dblog', 30 => 'mollom', 31 => 'dblog', 32 => 'mollom', 33 => 'dblog', 34 => 'mollom', 35 => 'dblog', 36 => 'mollom', 37 => 'dblog', 38 => 'mollom', 39 => 'dblog', 40 => 'mollom', 41 => 'dblog', 42 => 'mollom', 43 => 'dblog', 44 => 'mollom', 45 => 'dblog', 46 => 'mollom', 47 => 'dblog', 48 => 'mollom', 49 => 'dblog', 50 => 'mollom', 51 => 'dblog', 52 => 'mollom', 53 => 'dblog', 54 => 'mollom', 55 => 'dblog', 56 => 'mollom', 57 => 'dblog', 58 => 'mollom', 59 => 'dblog', 60 => 'mollom', 61 => 'dblog', 62 => 'mollom', 63 => 'dblog', 64 => 'mollom', 65 => 'dblog', 66 => 'mollom', 67 => 'dblog', 68 => 'mollom', 69 => 'dblog', 70 => 'mollom', 71 => 'dblog', 72 => 'mollom', 73 => 'dblog', 74 => 'mollom', 75 => 'dblog', 76 => 'mollom', 77 => 'dblog', 78 => 'mollom', 79 => 'dblog', 80 => 'mollom', 81 => 'dblog', 82 => 'mollom', 83 => 'dblog', 84 => 'mollom', 85 => 'dblog', 86 => 'mollom', 87 => 'dblog', 88 => 'mollom', 89 => 'dblog', 90 => 'mollom', 91 => 'dblog', 92 => 'mollom', 93 => 'dblog', 94 => 'mollom', 95 => 'dblog', 96 => 'mollom', 97 => 'dblog', 98 => 'mollom', 99 => 'dblog', 100 => 'mollom', 101 => 'dblog', 102 => 'mollom', 103 => 'dblog', 104 => 'mollom', 105 => 'dblog', 106 => 'mollom', 107 => 'dblog', 108 => 'mollom', 109 => 'dblog', 110 => 'mollom', 111 => 'dblog', 112 => 'mollom', 113 => 'dblog', 114 => 'mollom', 115 => 'dblog', 116 => 'mollom', 117 => 'dblog', 118 => 'mollom', 119 => 'dblog', 120 => 'mollom', 121 => 'dblog', 122 => 'mollom', 123 => 'dblog', 124 => 'mollom', 125 => 'dblog', 126 => 'mollom', 127 => 'dblog', 128 => 'mollom', 129 => 'dblog', 130 => 'mollom', 131 => 'dblog', 132 => 'mollom', 133 => 'dblog', 134 => 'mollom', 135 => 'dblog', 136 => 'mollom', 137 => 'dblog', 138 => 'mollom', 139 => 'dblog', 140 => 'mollom', 141 => 'dblog', 142 => 'mollom', 143 => 'dblog', 144 => 'mollom', 145 => 'dblog', 146 => 'mollom', 147 => 'dblog', 148 => 'mollom', 149 => 'dblog', 150 => 'mollom', 151 => 'dblog', 152 => 'mollom', 153 => 'dblog', 154 => 'mollom', 155 => 'dblog', 156 => 'mollom', 157 => 'dblog', 158 => 'mollom', 159 => 'dblog', 160 => 'mollom', 161 => 'dblog', 162 => 'mollom', 163 => 'dblog', 164 => 'mollom', 165 => 'dblog', 166 => 'mollom', 167 => 'dblog', 168 => 'mollom', 169 => 'dblog', 170 => 'mollom', 171 => 'dblog', 172 => 'mollom', 173 => 'dblog', 174 => 'mollom', 175 => 'dblog', 176 => 'mollom', 177 => 'dblog', 178 => 'mollom', 179 => 'dblog', 180 => 'mollom', 181 => 'dblog', 182 => 'mollom', 183 => 'dblog', 184 => 'mollom', 185 => 'dblog', 186 => 'mollom', 187 => 'dblog', 188 => 'mollom', 189 => 'dblog', 190 => 'mollom', 191 => 'dblog', 192 => 'mollom', 193 => 'dblog', 194 => 'mollom', 195 => 'dblog', 196 => 'mollom', 197 => 'dblog', 198 => 'mollom', 199 => 'dblog', 200 => 'mollom', 201 => 'dblog') ) ../mollom.test:98

 

kenorb’s picture

Project: Mollom » SimpleTest
Version: 6.x-1.15 » 6.x-2.10
Component: Tests » Code

So assuming that's general problem of SimpleTest.

rfay’s picture

Project: SimpleTest » Mollom
Version: 6.x-2.10 » 6.x-1.x-dev

I'd be surprised. Do you *want* 400 levels of recursion in your test? I'd recommend taking a look at your test.

I'm assuming Simpletest is complaining about recursion. And your included result looks like recursion.

rfay’s picture

Please make sure you use the latest dev of simpletest for D6, as a number of commits have happened since the last stable release.

sun’s picture

I'm not sure what is going on here, but it clearly seems that self::setUp() is repetitively called instead of parent::setUp():

call_user_func_array ( array (0 => class MollomAccessTestCase { ... }, 1 => 'parent::setUp'), array (0 => 'mollom', 1 => 'dblog', 2 => 'mollom', 3 => 'dblog') )

The inheritance looks this way:

DrupalWebTestCase::setUp()
^- MollomWebTestCase::setUp()
   ^- MollomAccessTestCase

This code hasn't been changed for a long time and there isn't really anything special about it.

Since @kenorb reported the same error also for FileField tests, it seems obvious that this is not a problem with this module's tests.

rfay’s picture

Project: Mollom » SimpleTest

OK, well I'll put it back then. Hmm. Pretty weird. And I assume we're using the dev of simpletest...

kenorb’s picture

This happens only with PHP 5.3.x (Tested with 5.3.5).

kenorb’s picture

Project: SimpleTest » Mollom

Following solution which I found work:

dmitry dot revenko at businessmedia dot ru 25-Sep-2009 12:28
Just hope this note helps someone (I killed the whole day on issue).

If you use something like this in PHP < 5.3:
call_user_func_array(array($this, 'parent::func'), $args);
Such a script will cause segmentation fault in your webserver.

In 5.3 you should write it:
call_user_func_array('parent::func', $args);

Source: http://php.net/manual/en/function.call-user-func-array.php

kenorb’s picture

Version: 6.x-1.15 » 6.x-1.x-dev
StatusFileSize
new544 bytes

Thanks for your help.

Attached patch fix the problem for Mollom 1.15 (latest stable release).

I'm not sure if it's some kind of PHP bug, or improper syntax.

kenorb’s picture

Status: Fixed » Needs review

I see that in dev, the code is different now. It was fixed in another way.
http://drupalcode.org/project/mollom.git/blobdiff/e44ea30d05bd1f33ccb95f...

-      call_user_func_array(array($this, 'parent::setUp'), $modules);
+      parent::setUp($modules);
kenorb’s picture

Version: 6.x-1.x-dev » 6.x-1.15
Status: Active » Fixed
kenorb’s picture

Version: 6.x-1.x-dev » 6.x-1.15
Status: Needs review » Fixed

Reported similar predictable bug for Admin Menu: #1146644: Admin Menu: Test: PHP 5.3 compability for parent::setUp callback

Following modules are affected by that syntax:

./admin_menu/tests/admin_menu.test:    call_user_func_array(array($this, 'parent::setUp'), array_merge(array('admin_menu'), $args));
./filefield/tests/filefield.test:    call_user_func_array(array($this, 'parent::setUp'), $modules);
./filefield/tests/filefield.test:    call_user_func_array(array($this, 'parent::setUp'), $modules);
./imagefield/tests/imagefield.test:    call_user_func_array(array($this, 'parent::setUp'), $modules);
./imagefield/tests/imagefield.test:    call_user_func_array(array($this, 'parent::setUp'), $modules);
./mentions/tests/mentions.test:    call_user_func_array(array($this, 'parent::setUp'), $modules);
./project/project.test:    call_user_func_array(array('ProjectWebTestCase', 'parent::setUp'), $modules);
./project_issue/project_issue.test:    call_user_func_array(array('ProjectIssueWebTestCase', 'parent::setUp'), $modules);

Last two (project project_issue) and are not affected anymore.

kenorb’s picture

kenorb’s picture

kenorb’s picture

Title: Simpletest: Maximum function nesting level of '400' reached, aborting! in tests/mollom.test on line 83 » Mollom: Maximum function nesting level of '400' reached, aborting! in tests/mollom.test on line 83
rfay’s picture

Thanks for the great work on this.

Status: Fixed » Closed (fixed)
Issue tags: -PHP 5.3

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 5d062d3 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #1107770 by kenorb, sun: Fixed E_STRICT warnings in tests.
    
    
  • Commit df824a4 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #1107770 by kenorb, sun: Fixed E_STRICT warnings in tests.
    
    

  • Commit 5d062d3 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #1107770 by kenorb, sun: Fixed E_STRICT warnings in tests.
    
    
  • Commit df824a4 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #1107770 by kenorb, sun: Fixed E_STRICT warnings in tests.