How to catch Exception inside the native code
Hello,
I have an error of unexpected exception during running native code,it occurrs randomly, not every time.
the error text is:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x9535F359
Function=acy_match+0xC6
Library=/usr/lib/libNegativeMatcher.so
I don't know what exactly cause the crash inside the c code but I think it might be memory leak . What I'm concern is that this exception cause program termination.
I have few questions:
1. This exception cause the java program to end. How can I catch this exception and avoid program termination?
2. What is0xC6 in:
Function=acy_match+0xC6
andPC=0x9535F359?
Can it help me track the problem inside the native code?
Thanks for your help.
[868 byte] By [
nava_123a] at [2007-11-26 14:20:29]

# 2
> An unexpected exception has been detected in native
> code outside the VM.
> Unexpected Signal : 11 occurred at PC=0x9535F359
> Function=acy_match+0xC6
> Library=/usr/lib/libNegativeMatcher.so
>
> I don't know what exactly cause the crash inside the
> c code but I think it might be memory leak . What
> I'm concern is that this exception cause program
> termination.
I doubt it is a memory leak (actually I am rather certain that another error would occur if it was just memory exhaustion.)
> I have few questions:
> 1. This exception cause the java program to end. How
> can I catch this exception and avoid program
> termination?
I suspect that would be a really bad idea. That particular signal very likely indicates that you have corrupted memory. Continuing is unlikely to work.
> 2. What is 0xC6 in:
>
As a guess it is an offset into the compiled code which indicates where the memory problem was detected.
That it unlikely to help you with a pointer/memory problem because that is where it was detected and not where it happened. By comparing the source you might be able to determine what was bad and then trace it back.