Closed kduske closed 7 years ago
@ericwa there's this: http://docs.wxwidgets.org/trunk/classwx_debug_report.html
I knew about it and have dismissed using it for some reason that I don't remember. Maybe I was wrong?
I just experimented with OnFatalException and wxStackWalker a bit, and was able to get it working on OS X.
I tried triggering a crash with a null pointer dereference, and the OnFatalException handler gets called and I can print the stack trace of where the null pointer dereference happened. Haven't tried wxDebugReport yet, but it sounds good.
Here's what wxDebugReport looks like: Looks like you can add arbitrary information to the xml file - GL driver version would be useful.
I'm not sure if it's necessarily useful, the dialog is kind of verbose, and I think it would be better to save the crash report alongside the map file, rather than in a temporary directory. The other concern I have is, sending the report by email doesn't sound great to me; I don't have a desktop email client set up and wxWidgets doesn't seem to have a way to compose an email with a given attachment.
What if TB did the following instead?
Yes, that sounds better than the email option. One thing to consider is where to save the map and error file if the map file was currently not yet saved. The file should contain all necessary info, which I consider to be
Also, it doesn't have to be XML at all. Actually, I'd much rather it just be text. So, since you have this half working already, would you consider implementing this?
Sounds good - I'll continue implementing this. Yeah, I was leaning towards plain text as well.
Looks like http://docs.wxwidgets.org/trunk/classwx_standard_paths.html offers access to places like the user's Documents or Desktop directory, so maybe putting crash reports for unsaved documents in Documents would work?
Also need to handle the case when mapname-crash.{map/txt} already exist - maybe appending a number suffix like mapname-crash-2.txt?
Yes to both questions.
When a crash occurs: