PDA

View Full Version : Errors...



???
08-21-2008, 07:29 PM
I have a script and firefox says "too much recursion" and IE (actually IE Tab in ff) says "stack overflow". The script works fine but what do those errors mean, and are they related? (The errors arn't even at the same line)
Tell me if the code is needed but if I knew what those where I could probably fix it.

Thanks,
Stephen

DigitalBard
08-21-2008, 07:36 PM
Your function is calling itself too many times, essentially...

Every time your function calls itself, it pushes more data on the stack and if the stack size isn't large enough to handle it, you'll get that error. And as far as I know, there is no way to change the stack size within IE or FF.

You've literally got a function that is in an endless loop with no exit.

???
08-21-2008, 08:52 PM
I'm pretty sure I don't have a function, but could it be a variable? I've got a prototype with a property "element" and then "element" has a property "parent", which loops back. Should I make the "parent" property into the function "getParent", or is that not the problem?

mburt
08-21-2008, 08:53 PM
Do you have a loop anywhere?

DigitalBard
08-21-2008, 09:10 PM
without seeing the code, it's difficult to know

???
08-21-2008, 10:08 PM
Err, yeah. Thanks for the help. I found the problem and learned my lesson with alerts. I was using them for debugging and encountered the infinite loop. I had to end the task with Task Manager. It wasn't pretty.

Thanks,
Stephen