ExBemined Posted November 24, 2014 Share Posted November 24, 2014 We experience a situation where we accidentally had an infinite recursion in script. Naturally this resulted in a stack overflow, as it would do in C++ as well. However debugging this to find out where it came from turned out to be kinda tricky, as no callstack is created from the script functions during a stack overflow (as it does for most other script runtime errors). Basically the only way to resolve this is to put logspamming in all functions and follow them until you get to the function that is called but never returns. In our case it was luckily only 3 functions deep since the last extern function call we saw in the C++ callstack, but there are situations where the callstack is a lot deeper then that in our code. Would it be possible to somehow get the callstack from the script functions on a stack overflow? The functionality is there (if Interpreter::error is called to report the error), but stack errors are simple asserts in C++ and don't trigger the trace function. Link to comment
silent Posted November 25, 2014 Share Posted November 25, 2014 Hi, I've passed this information to the developers. Waiting for the feedback. Thanks for the detailed description. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted February 13, 2015 Share Posted February 13, 2015 Hi, Feature implemented, will be available in the next SDK update. Now engine will not crash on infinity recursion (sample in attachment). Thanks! recursion_00.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
firat.yuzbasioglu Posted February 17, 2015 Share Posted February 17, 2015 Thanks for your care and attention. Link to comment
Recommended Posts