How can I get the stack trace when Java JVM/JNI crashes ?

F

for.fun

Hi everybody,

I am developping a JNI DLL using Visual Studio .NET 2003 (VC++ 7.1)
under Windows XP SP2 running on a Intel CPU.
I am using JDK 1.5

I succeeded in entering in my JNI C++ code with VS .NET (I start the
"java" process from VS .NET and then stop on the breakpoints I set in
my JNI C++)


Here is my problem :

My process works for hours and suddenly crashes with an unexpected
exception. Hotspot reports the stack trace with the methods' address. I
can retrieve the matching methods in my JNI C++ code but it is not very
convenient since I do not have the crash context.

Under Windows, we have Structured Exception Handler which allows you,
Dr. Watson or other crash handlers to inspect the crash context.
Unfortunately, it seems that Hotspot overrides the SEH and do not let
VS .NET catching the SEH exception.

Instead, I just have a "hs_err_pid<process_id>.log"

Does anybody know if there is a way to tell Hotspot (java) to let VS
..NET to catch SEH and then allow me to enter in the crash source code
from VS .NET keeping the context (memory, variables, stack ...) ?


Thanks in advance for your help.
 
F

for.fun

Because nobody replied and because I can not get rid of my problem, I
try again :

Does anybody know an issue to prevent Java Virtual Machine from
trapping crash exceptions (SEH) and let Windows trap it instead ?

.... and let debuggers or Dr Watson tools do the job.


Thanks a lot if you have an idea.


PS: I tried "-Xrs" "java" option but it does not seem to change
anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top