5 messages in net.java.dev.jna.users[jna-users] struct containing wchar_t*
FromSent OnAttachments
seb bratieresJul 17, 2007 3:43 am 
Timothy WallJul 17, 2007 4:38 am 
j impalaJul 18, 2007 9:59 am 
Timothy WallJul 18, 2007 11:24 am 
Timothy WallJul 18, 2007 12:42 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:[jna-users] struct containing wchar_t*Actions...
From:j impala (mabo@yahoo.de)
Date:Jul 18, 2007 9:59:49 am
List:net.java.dev.jna.users

Thank you for fixing this bug. I checked out rev 176. I managed to boil down one
remaining bug to a simple test case, which you may want to look into:

* JNA type declarations

import com.sun.jna.Structure; import com.sun.jna.Union; import com.sun.jna.WString;

public class testClass { public static class myUnion extends Union { public long l; } public static class otherStruct extends Structure { public myUnion u; } public static class simpleStruct extends Structure { public WString ws; public otherStruct o; } }

* Java test code public void testStructure() { testClass.simpleStruct s = new testClass.simpleStruct(); logger.trace("before simple toArray"); s.toArray(new testClass.simpleStruct[2]); logger.trace("after simple toArray"); } (where my logger statements can be replaced by sysouts)

will make the JVM crash. To reproduce the bug, it is necessary that BOTH WString
and a Union be inside simpleStruct.

Thank you.

Sebastien