I am trying to use wxCrashReporter but find that it does not catch all types of fatal errors under MSW. I am using 3.1.0 and was using VS2008 32 bit but have since also tried VS2013 32bit and 64bit. I am running on Windows 7 64 bit.
The problem I have is that if I try to perform some invalid operation that the MS VC runtime detects then the application is terminated without OnFatalException() being called. If I run the debugrpt sample then I can generate the "Report for crash" and it is caught. However, if I add some dummy code, similar to a problem I had recently that is driving this addition, to the debugrpt sample:
Code: Select all
static void bar(const char *p)
{
std::vector<int> v(10, 0);
v.insert(v.begin() + 50, 20);
- VS2008 application terminates with message "Microsoft Visual Studio C Runtime Library has detected a fatal error in debugrpt.exe" or the normal Windows application has crashed window.
- VS2013 32 and 64 bit tend to not crash at the line of the insert - seems the VC runtime checks for this case and uses end of vector instead of using an invalid address.