JNI crash can not be capture on Windows
Description
I build a sentry.dll using Crashpad as backend. Then I pack it and crashpad_handler.exe in my Java project. I want to invoke the init API of sentry so it can capture the other JNI invoke crash in this process. But when I trigger a JNI crash, it looks like JVM has handled the crash and created a minidump file, and sentry.dll does nothing in this crash. Here is the output:

How to make sentry-native capture and report this crash, rather than handled by JVM?
When does the problem happen
- [ ] During build
- [ ] During run-time
- [x] When capturing a hard crash
Environment
- OS: [Windows 10, 64-bit]
- Compiler: [MSVC 19]
- CMake version and config: [SENTRY_BACKEND=crashpad]
- JRE: [JRE 7.0_80-b15]
- JVM: [Java Hotspot Client VM x86]
https://github.com/getsentry/sentry-native/blob/90966cc1022b8155681b6899539b35466baccf2c/include/sentry.h#L1070-L1079
The sentry_reinstall_backend function is there specifically for the situation where another part of the program overrides the crash handlers.
However, I am not entirely sure this will work in this case, it seems you initialize sentry after the JVM is already active. Which sounds like it is overriding the crash handler after the init call again. I have little experience with how JRE handles these things.
Closing due to inactivity. Feel free to reopen if this issue still matters.