Page 1 of 1
RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 04:47
by aubergine
Uhm, what have I broken?
Code: Select all
error |02:44:50: [js_include:289] Uncaught exception at line 0, include file multiplay/skirmish/APIs/Test.js: RangeError: Maximum call stack size exceeded.
error |02:44:50: [js_include:289] Uncaught exception at line 564, include file multiplay/skirmish/APIs/Test.js: RangeError: Maximum call stack size exceeded.
...
info |02:44:50: [loadPlayerScript:428] Uncaught exception at line 564, file multiplay/skirmish/eggplant.js: RangeError: Maximum call stack size exceeded.
Re: RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 04:59
by vexed
This smells like recursion to me.
Re: RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 05:02
by aubergine
Yup, and I have a rough idea of what's causing it -- but how do I track it down, eg. to a specific function, etc?
Re: RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 08:24
by aubergine
Yup, it was indeed a recursive function. A routine that checked to see if a specific API was loaded, by checking to see if it was loaded, by checking to see if it was loaded... >universe implodes<
Re: RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 20:38
by Lord Apocalypse

Maybe you should add a pause or tell it to implode the universe after x number of tries instead of being the never ending recursive loop
Re: RangeError: Maximum call stack size exceeded.
Posted: 28 Nov 2012, 22:11
by aubergine
Well, at least it's not as bad as the time that I made a getter/setter property that returned the function that I created it with. It recursively recreated itself, which wouldn't have been so bad if it weren't for the fact that the getter/setter was designed to allow multiple functions to be nested in an event handler, so when the event fired the called function not only recursively recreated itself within itself, it also added itself to the list of functions to be called the result being an infinite multi-dimensional array of infinite multi-dimensional arrays.
Re: RangeError: Maximum call stack size exceeded.
Posted: 29 Nov 2012, 03:39
by Lord Apocalypse

Doh! That sounds insane