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

safeExecuteWithValidation raising SAMP-Exception dialog #35

Open
ghost opened this issue Mar 18, 2017 · 4 comments
Open

safeExecuteWithValidation raising SAMP-Exception dialog #35

ghost opened this issue Mar 18, 2017 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 18, 2017

E.g.
WRITE(int(Utils::SafeBlock::safeExecuteWithValidation([&](){ Rendering::Renderer::sharedRenderer().getAs<Rendering::Box>(id)->setBoxHeight(height); })));

id is invalid, a nullptr is returned and is used. Normally the try/catch should get it, but SAMP raise an exception dialog before. The game is running and not crashed, so the safeExecuteWithValidation works.

Bug

@ghost ghost added the bug label Mar 18, 2017
@agrippa1994
Copy link
Member

Is this bug reproducible? If the exception is caught by the exception handler, then it must be somewhere else. Maybe the WRITE macro itself fails ...

@ghost
Copy link
Author

ghost commented Mar 18, 2017

@agrippa1994
Copy link
Member

That might be a reason because C++ STL containers are not thread safe. Does it still crash if you add the missing mutex there?

@ghost
Copy link
Author

ghost commented Jun 2, 2017

Nope, also I thought about it. Is safeExecuteWithValidation even catching an exception?
Maybe not because SAMP set the UnhandledExceptionHandler.

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

No branches or pull requests

1 participant