Zeg-Vok Posted July 18, 2005 Most likely a noob question, but what exactly are they? And how would one prevent them from happening? 0 Share this post Link to post
CodeImp Posted July 19, 2005 Too many nested function calls. Usually happens with recursive functions when the tree it walks through is too deep. 0 Share this post Link to post
Zeg-Vok Posted July 19, 2005 By function calls, you mean like A_CustomMissile and such? 0 Share this post Link to post
NiGHTMARE Posted July 19, 2005 No, he means internal engine functions :). 0 Share this post Link to post
Zeg-Vok Posted July 19, 2005 Theres no way for me to avoid that, is there? 0 Share this post Link to post
Quasar Posted July 19, 2005 Actually some not entirely internal functions in DOOM could cause stack overflows too. The Look and Chase codepointers, if called from the wrong frames, would cause this easily. Here's why, as an illustration of how these kinds of things can happen: Let's say these are the thing's frames (in EDF just for the hell of it), as two different examples. frame foo1 { cmp = "AAAA|A|*|10|Chase|@this" } // thing's spawnstate frame foo2 { cmp = "AAAA|A|*| 4|Look |@next" } // thing's seestate Problem #1: Chase called from spawnstate. The thing's target is NULL, since it has never seen a target yet, so the code directs it to return to its spawnstate (monsters with no target "fall asleep"). The spawnstate codepointer gets called again. Chase. Chase will mutually recurse with P_SetMobjState forever. Problem #2: Look called from seestate. Assuming the thing has a valid target, if it calls Look, the code directs it to go to its seestate (aka first walking frame for you DeHackEd people). It's already in its first walking frame, though, so it's going to call Look again. Look will mutually recurse with P_SetMobjState forever. 0 Share this post Link to post
Zeg-Vok Posted July 19, 2005 Hmmm, well, I do have a projectile with A_Chase in its spawnstate, but it still works, but Ill assume that since I only get stack overflows when I test out my weapons in a bot DM, there might be too much going on 0 Share this post Link to post