long time away from posting, but still working on my orx game.
I'd like to know if anyone here have a sort of crash report for segment fault violation. I want my game to dump a stack trace or something useful for me to track the error down.
Are you using CodeLite? I generally find when I get a stacktrace, I switch to the callstack and see exactly what method and object caused the issue. Then I drill into the object properties to see what might be a problem.
99% of the item, I have not handled a null object.
I'm sorry I was not clear in the description. I meant a crash report for release builds. When the user is playing the game and she gets a crash error, I want to generate a log with the callstack and any other userful info to help me find the bug.
I am developing the game on windows, so I need something that works for it right now. I will release the game also for linux and mac, but I need to focus in order to finish the game.
here are some links that might help you in that quest:
- Use Dr.Watson (now called WER) to generate a crash dump, requires some installation/work on the client side, here's an old doc that gives an idea how to do that: http://docs.oracle.com/cd/E19199-01/820-0437/dumps-on-windows/index.html
- Use the MiniDump API to generate a MiniDump on windows: http://www.codeproject.com/Articles/1934/Post-Mortem-Debugging-Your-Application-with-Minidu
- Integrate google-breakpad, a cross-platform library used in Firefox and Chrome that will generate the crashdump, do some processing and even send it back to your server: http://code.google.com/p/google-breakpad/ / Getting Started: http://code.google.com/p/google-breakpad/wiki/GettingStartedWithBreakpad
- Integrate CrashRPT, a MSVS-only library that does a similar thing but is apparently much easier to use: http://crashrpt.sourceforge.net/docs/html/getting_started.html
I've never used any of those, so let us know if one works particularly well for you or what you've discovered on your side!
PS: Most of those options will only work in C++ when an unhandled exception occurs, not in plain old C.
thank you for the suggestions.
I have started integrating Crashrpt before I asked for help. I just wanted to know whether anyone of you had tried something else.
Anyway, I managed to integrate CrashRPT into my game and it works pretty good. It saves the minidump of the game state when an exception occurs. It also has an option to send the dump to a server, but unfortunatly it didn't worked for me and I don't have mush time to figure it out.
I just need to finish some issues and then I think I'll be able to release a demo build for you guys to try it out.