Jump to content

Recursive function call


photo

Recommended Posts

Posted

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.

Posted

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.

Posted

At the present moment the call stack length equals 1024. It will be expanded in 3 times in next SDK release (second half of July).

  • 3 weeks later...
Posted

test scene isn't working still (in newest release)

  • 3 weeks later...
Posted

Works fine under Linux. This seems to be a Windows-specific issue with stack overflow. Our CTO will look into it and sort it out.

  • 2 weeks later...
Posted

Is there any progress in solving this problem?

Posted

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.

×
×
  • Create New...