Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error with map erase that BugTrap seems cannot capture? #24

Open
jnnpsubm opened this issue May 22, 2017 · 1 comment
Open

An error with map erase that BugTrap seems cannot capture? #24

jnnpsubm opened this issue May 22, 2017 · 1 comment

Comments

@jnnpsubm
Copy link

`#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);
}`

@NeoAnomaly
Copy link
Contributor

NeoAnomaly commented Oct 15, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants