S
Steve
I'm working in Visual Studio 2008 on Windows XP. I've got a 32-bit
environment at work and a 64-bit environment at home, and both exhibit
this mystery.
I'm working on a project that consists of a C++ main program with an
embedded JVM. The C++ code calls java bytecode via JNI and that
bytecode can call back into the C++ code via JNI native methods.
This all works great...except when it doesn't. I'm finding it very
difficult to debug problems in my native callback methods because
whenever a fatal exception (say a null pointer reference, for example)
occurs, the program just exits rather than dropping into the debugger
like I would expect.
To be clear...I'm running my C++ app in the debugger. I can step
around, and if I dereference a null pointer, I get the familiar
"something bad happened, do you want to debug?" dialog. But if my
code enters the JVM and then calls back into my C++ code via a JNI
native method, a null pointer deref leads to my app just exiting
without me getting any kind of look at what caused the exit.
Can anyone tell me why this occurs? Better still, is there some way I
can change this behavior so that fatal problems in native methods are
caught by the Visual Studio debugger?
TIA for any help, which will be greatly appreciated.
Steve
environment at work and a 64-bit environment at home, and both exhibit
this mystery.
I'm working on a project that consists of a C++ main program with an
embedded JVM. The C++ code calls java bytecode via JNI and that
bytecode can call back into the C++ code via JNI native methods.
This all works great...except when it doesn't. I'm finding it very
difficult to debug problems in my native callback methods because
whenever a fatal exception (say a null pointer reference, for example)
occurs, the program just exits rather than dropping into the debugger
like I would expect.
To be clear...I'm running my C++ app in the debugger. I can step
around, and if I dereference a null pointer, I get the familiar
"something bad happened, do you want to debug?" dialog. But if my
code enters the JVM and then calls back into my C++ code via a JNI
native method, a null pointer deref leads to my app just exiting
without me getting any kind of look at what caused the exit.
Can anyone tell me why this occurs? Better still, is there some way I
can change this behavior so that fatal problems in native methods are
caught by the Visual Studio debugger?
TIA for any help, which will be greatly appreciated.
Steve