Jump to content

Recursive function call


photo

Recommended Posts

Has Unigine limit to recursive calls? We have game dialog, represented as xml-tree, that contain more than 38 nesting levels (If we have less than 38 levels - it's ok, if more - Unigine is crashed). In game logic this xml parses and for all xml-nodes creates class instance, and this dialog presents in script via tree. So, question is, what length of call stack we can use in Unigine script? Thanks.

Link to comment

Has Unigine limit to recursive calls? We have game dialog, represented as xml-tree, that contain more than 38 nesting levels (If we have less than 38 levels - it's ok, if more - Unigine is crashed). In game logic this xml parses and for all xml-nodes creates class instance, and this dialog presents in script via tree. So, question is, what length of call stack we can use in Unigine script? Thanks.

Please, sent to support@unigine.com a minimal code for reproduction of this issue.

Link to comment
  • 3 weeks later...
  • 3 weeks later...
  • 2 weeks later...

The problem lies in the fact that it's not a script stack overflow, but instead Windows stack overflow. What happens is a user class constructor calls another user class constructor and then again and again, recursively until the system cannot handle it. The most rational variant for solving this problem is to try to avoid such recursion in your code. On our side, developers are still trying to figure out what can be done.

Link to comment
×
×
  • Create New...