12 messages in net.java.dev.jna.usersRe: [jna-users] JNA problems when wor...
FromSent OnAttachments
Stas OskinSep 17, 2008 5:06 am 
Timothy WallSep 17, 2008 6:07 am 
Stas OskinSep 17, 2008 9:55 am 
Timothy WallSep 17, 2008 10:39 am 
Wayne MeissnerSep 17, 2008 10:54 am 
Stas OskinSep 17, 2008 11:07 am 
Timothy WallSep 17, 2008 11:30 am 
Stas OskinSep 18, 2008 2:00 am 
Timothy WallSep 18, 2008 5:50 am 
Stas OskinSep 18, 2008 7:37 am 
Stas OskinSep 18, 2008 11:04 am 
Timothy WallSep 18, 2008 11:29 am 
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] JNA problems when working with shared memoryActions...
From:Timothy Wall (twal@dev.java.net)
Date:Sep 17, 2008 11:30:53 am
List:net.java.dev.jna.users

On Sep 17, 2008, at 2:07 PM, Stas Oskin wrote:

Hi.

Thanks for the information, I didn't know about the syncronizedLibrary requirement and will check it.

Note that this is only the case for when jna.protected=true/ Native.setProtected(true). Otherwise it's up to you whether you want entry to your library synchronized.

Also, here is the log that I got from java core file. Any idea what it means? Again, demangling the function names would be very helpful.

Regards.

#0 0x000000389e430155 in raise () from /lib64/libc.so.6 (gdb) backtrace #0 0x000000389e430155 in raise () from /lib64/libc.so.6 #1 0x000000389e431bf0 in abort () from /lib64/libc.so.6 #2 0x00002b4aa37873f7 in os::abort () from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so #3 0x00002b4aa38e5bad in VMError::report_and_die () from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so #4 0x00002b4aa378c70c in JVM_handle_linux_signal () from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so #5 0x00002b4aa378955e in signalHandler () from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so #6 <signal handler called> #7 0x000000389e47a22b in memcpy () from /lib64/libc.so.6 #8 0x00002b4aa35f2501 in jni_SetByteArrayRegion () from /usr/java/jdk1.6.0_07/jre/lib/amd64/server/libjvm.so #9 0x00002aaad6a386ea in Java_com_sun_jna_Pointer__1read__J_3BII () from /tmp/jna6448.tmp

This isn't really any different than you already knew. The Pointer's peer value seems to be bogus, which causes the read of a byte array from native memory to fail. The VM signal handler catches the SEGV and dumps.