BugTrap
BugTrap copied to clipboard
An error with map erase that BugTrap seems cannot capture?
`#include <Windows.h> #include "BugTrap\BugTrap.h" #include
#pragma comment(lib, "BugTrap\BugTrapU.lib") // Link to Unicode DLL
void SetupExceptionHandler();
int main() { SetupExceptionHandler(); BT_SetTerminate();
std::map<int, int> idMap;
idMap[0] = 1;
idMap.erase(idMap.begin());
idMap.erase(idMap.begin()); // BugTrap cannot capture this exception with my pc and environment
//int* ptr = 0; *ptr = 0; // BugTrap can capture this exception
return 0;
}
void SetupExceptionHandler() { BT_InstallSehFilter(); BT_SetFlags(BTF_DETAILEDMODE | BTF_EDITMAIL); }`
It's not a bug, it's an OS feature :)
Heap exceptions treated as critical errors and handled by the kernel itself(send info to WER then terminate process) and didn't dispatched to the user mode.
Such behaviour can't be changed without dirty, OS specific hacks.
So WER reports is useful for debugging such errors.