hiker {l Wrote}:Since it appears that you have this crash often, could you run stk in a debugger and provide a stack trace?
When reading this, I realized how common such a situation was for a project like STK. Plus, I think many users (well, players ) don't know how to compile STK in debug mode, run it into a debugger, what a stack trace is, etc.
For my own project, I recently created very simple code to get and print a nice stack trace when it crashes (in case I hadn't started it in the debugger).
I think such a feature could be useful for STK
So here is the "project":
http://dl.dropbox.com/u/20292682/backtrace.7z
It's really small (just a snippet actually), nothing fancy, it just works, but has only been tested on Linux (maybe works on MacOS X).
An equivalent code for Windows would use StackWalk64 I think.
I do plan on making a Windows version at some point.
You can compile the project just by typing "scons" (if you have SCons installed of course).
If you want to compile it by hand, add the "-g" and "-rdynamic" options.
Of course, the downside of systematically using -g and -rdynamic to produce STK's binaries is that they would be slightly bigger (symbols), but I don't think this would impact performance (please tell me if I am wrong).
The bright side is that anyone (well, for the moment anyone on a Unix-like system, which is really restrictive, I know ) would be able to give you a stack trace of any crash without the need of a debugger \o/ And a bug that is hardly reproducible would not be missed if the stack trace was logged into a file, instead of just printing it as is done in my example
That's just a snippet of code, and sadly it doesn't get the line numbers, the values of the variables, etc. We would need a real core dump for all that...(getting the line numbers would really be cool though).
This is in the public domain, feel free and welcome to modify it so that it suits your needs, if you are interested