3 messages in net.java.dev.jna.usersRe: [jna-users] another access violat...
FromSent OnAttachments
Hai Yun TaoAug 19, 2007 4:31 am 
Hai Yun TaoAug 19, 2007 12:37 pm 
Timothy WallAug 27, 2007 12:43 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] another access violation problemActions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 27, 2007 12:43:32 pm
List:net.java.dev.jna.users

On Aug 19, 2007, at 3:37 PM, Hai Yun Tao wrote:

And just to add on that sometimes the access violation occurs even no resultant datatype conversion occurs, for example:

void foo(void); // even this kind of functions gives access violation

and the JVM gets halted because of this access violation during the execution of such method. But the problem is that I don't seem to find any problems when calling these kinds of methods from C, not error, no warning, nothing at all. So why JVM is halted? This kind of function signature doesn't have a parameter or return value.

You will get a crash when the stack and arguments are not set up properly for the call to the C function, and sometimes when the C function encounters improper values in its arguments.

If you get a VM crash in a call to a function with no arguments and no return values, it's more likely that the C code is the culprit than the Java/JNA side.