2

I created a null dereference in C++ code that is called from java exe. AeDebug registry key is set with notepad (for testing.) However, the app crash does not launch notepad. Attached windbg and found the jvm has exception handler called by system, the handler terminates the process.

...
jvm!c2v_getThreadLocalLong+0x212268
ntdll!RtlpExecuteHandlerForException+0xd
ntdll!RtlDispatchException+0x373
ntdll!KiUserExceptionDispatch+0x3a
...

Im aware of the -XX:OnError vm arg that will run any cmd on crash, but its not ideal for my use, hence I need the cmd set in AeDebug to trigger.

How to prevent jvm from terminating the process without triggering the cmd set in AeDebug key

1 Answer 1

1

Add -XX:+UseOSErrorReporting JVM option to propagate the crash to the OS error handler. In this case, Windows should call the debugger command specified in AeDebug registry key.

Alternatively, you may use -XX:+ShowMessageBoxOnError option. When a crash happens, JVM will freeze the process and show a dialog inviting you to attach a debugger manually.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.