Warning: Stack overflow

Spent half a day trying to identify the cause of this, in an AS2 project.

A stupid recursion problem caused by something similar to the following:
function getResult() : Boolean {
trace(getResult():” + getResult());
return value;
}

The Flash player just used to hang on error on problems like this, but now it fails silently (or with a Stack Overflow warning in the debug player) which is good for the user but bad for debugging! Compounded by the problem that the bug was in a trace statement,  which are usually transparent to my seeking eye.

I was of course cursing that I’d found a problem with the Flash Player, when Rule #1 is 99.999999999% of the time it’s your own stupid fault.

Leave a Reply