Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jni error message interpretation

Reply
Thread Tools

jni error message interpretation

 
 
tupolev
Guest
Posts: n/a
 
      06-30-2003
Hello all,
I am using JNI and I am receiving an error here and there.
I would like to interpret the message that JNI launches when this
error happens. In particular it would be good to understand this part:

An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : 11 occurred at PC=0x4D03B46E
Function=_ZN7MyLibrary5mysock6SelectEiP6fd_setS2_S 2_P7timeval+0x278

1) What is the unexpected signal number 11?

2) I have understood that the function that crashes is situated in
MyLibrary, class mysock, function Select and that an object fd_set is
crashing within the function. But where? and what are all those
numbers in the function? and what does that timeval mean?

Thank you for the help.
 
Reply With Quote
 
 
 
 
Gordon Beaton
Guest
Posts: n/a
 
      06-30-2003
On 30 Jun 2003 01:24:25 -0700, tupolev wrote:
> I am using JNI and I am receiving an error here and there. I would
> like to interpret the message that JNI launches when this error
> happens. In particular it would be good to understand this part:
>
> An unexpected exception has been detected in native code outside the
> VM.
> Unexpected Signal : 11 occurred at PC=0x4D03B46E
> Function=_ZN7MyLibrary5mysock6SelectEiP6fd_setS2_S 2_P7timeval+0x278
>
> 1) What is the unexpected signal number 11?
>
> 2) I have understood that the function that crashes is situated in
> MyLibrary, class mysock, function Select and that an object fd_set is
> crashing within the function. But where? and what are all those
> numbers in the function? and what does that timeval mean?


The error is otherwise known as segmentation fault. It occurrs when
you attempt to access (read or write) a memory location that you do
not have permission for. The kernel has sent a signal (number 11) to
kill the process.

The PC number is the value of the program counter at the time the
error occurred. The other thing is the name of the function that was
executing and a byte offset (0x27 within the function.

It indicates an error in your native code involving pointers. That
could mean many different things, but here are some typical examples:

- you have used the value of an uninitialized variable.
- you have failed to check the return value of a function, and assumed
that it succeeded.
- you have written beyond the bounds of something, thereby changing
the value of a neighbouring structure, which now contains nonsense.
- you have used some type X as though it were some other type Y.

There are tools like Mpatrol, Valgrind and Purify that can help you
debug this.

If you are new to JNI or C this kind of error is quite common. If
there isn't very much code, post it here and someone might look
through it for you.

/gordon

--
[ do not send me private copies of your followups ]
g o r d o n . b e a t o n @ e r i c s s o n . c o m
 
Reply With Quote
 
 
 
 
tupolev
Guest
Posts: n/a
 
      06-30-2003
Gordon Beaton <(E-Mail Removed)> wrote in message news:<bdotcp$9a6$(E-Mail Removed)>...
> On 30 Jun 2003 01:24:25 -0700, tupolev wrote:
> > I am using JNI and I am receiving an error here and there. I would
> > like to interpret the message that JNI launches when this error
> > happens. In particular it would be good to understand this part:
> >
> > An unexpected exception has been detected in native code outside the
> > VM.
> > Unexpected Signal : 11 occurred at PC=0x4D03B46E
> > Function=_ZN7MyLibrary5mysock6SelectEiP6fd_setS2_S 2_P7timeval+0x278
> >
> > 1) What is the unexpected signal number 11?
> >
> > 2) I have understood that the function that crashes is situated in
> > MyLibrary, class mysock, function Select and that an object fd_set is
> > crashing within the function. But where? and what are all those
> > numbers in the function? and what does that timeval mean?

>
> The error is otherwise known as segmentation fault. It occurrs when
> you attempt to access (read or write) a memory location that you do
> not have permission for. The kernel has sent a signal (number 11) to
> kill the process.
>
> The PC number is the value of the program counter at the time the
> error occurred. The other thing is the name of the function that was
> executing and a byte offset (0x27 within the function.
>
> It indicates an error in your native code involving pointers. That
> could mean many different things, but here are some typical examples:
>
> - you have used the value of an uninitialized variable.
> - you have failed to check the return value of a function, and assumed
> that it succeeded.
> - you have written beyond the bounds of something, thereby changing
> the value of a neighbouring structure, which now contains nonsense.
> - you have used some type X as though it were some other type Y.
>
> There are tools like Mpatrol, Valgrind and Purify that can help you
> debug this.
>
> If you are new to JNI or C this kind of error is quite common. If
> there isn't very much code, post it here and someone might look
> through it for you.
>
> /gordon


Thank you very much Gordon for your help.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with error output interpretation Tom Cloyd Ruby 2 05-20-2008 11:22 AM
Interpretation of warning message Brain Dead Firefox 2 05-09-2007 06:23 PM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:03 AM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:01 AM
IBM's JNI fails where Sun's JNI works Alex Hunsley Java 4 11-04-2003 10:34 AM



Advertisments