Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any way to catch EXCEPTION_ACCESS_VIOLATION?

843829Dec 14 2001 — edited Jan 28 2002
I have to call some 3rd-party code for which I do not have source (just a windoze dll) from JNI C++ code. Sometimes this third party (Fortran) code crashes, taking down the entire process with an "EXCEPTION_ACCESS_VIOLATION outside the VM" message. This is probably due to a segment violation in the Fortran (probably something like writing to a way out of bounds array element). I can't do anything about that, but I would LOVE to be able to catch the EXCEPTION_ACCESS_VIOLATION either in a C signal handler in my JNI code or in Java. JNI apparently issues the EXECPTION_ACCESS_VIOLATION message, so JNI knows how to catch the low-level native signal. Is any of that exposed? It would be great if JNI provided some way to do some clean-up as the process was exiting. Is there any way? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2002
Added on Dec 14 2001
4 comments
857 views