sentry-native
sentry-native copied to clipboard
Crashpad not capturing invalid_parameter errors on Windows
Description I'm trying to catch an error with sentry/crashpad, but it's not detecting it. Should sentry being called through invoke_watson or could this exception type not be handled by sentry/crashpad? Are there any possibilities to debug the crashpad-handler / Windows Error Reporting?
When does the problem happen
- [x] When capturing a hard crash
Environment
- OS: Windows Server 2016
- Compiler: MSVC VS 2017
Issue A messagebox (from windows) is showing that our app stopped working.
Callstack of our app:
ucrtbase.dll!__invoke_watson() Unknown
ucrtbase.dll!__invalid_parameter() Unknown
ucrtbase.dll!__invalid_parameter_noinfo() Unknown
ucrtbase.dll!__crt_stdio_output::output_processor<char,__crt_stdio_output::string_output_adapter
Expected behavior Sentry catches the Exception and our app quits.
Looks like Crashpad backend does not call _set_invalid_parameter_handler()
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler?view=vs-2019
Linking this thread for visibility, where we were discussing the same for the Breakpad backend: https://github.com/getsentry/sentry-native/pull/290#issuecomment-642227678
Interestingly, Electron ignores it, too. See here.