6 messages in net.java.dev.jna.usersRe: [jna-users] Structure with nested...
FromSent OnAttachments
Gabriele ForbitiDec 21, 2007 2:20 am 
Timothy WallDec 21, 2007 6:40 am 
Gabriele ForbitiDec 21, 2007 9:26 am 
Timothy WallDec 21, 2007 2:46 pm 
Gabriele ForbitiDec 22, 2007 10:12 am 
Timothy WallDec 22, 2007 12:30 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] Structure with nested array of structuresActions...
From:Timothy Wall (twal@dev.java.net)
Date:Dec 22, 2007 12:30:14 pm
List:net.java.dev.jna.users

I only updated the source files, not the binary, which is why you still get the error. The jar files are not updated with every change to the sources.

Contact me off-list if you'd like me to send you an updated jna.jar.

On Dec 22, 2007, at 1:12 PM, Gabriele Forbiti wrote:

Timothy,

I updated from svn and replaced jna.jar in my app libs with the one I found in jna/jnalib/dist. I noticed from src files you applied the fix but the problem persists. Here's the stack trace:

java.lang.NullPointerException at com.sun.jna.Structure.getNativeSize(Structure.java:850) at com.sun.jna.Structure.getNativeSize(Structure.java:857) at com.sun.jna.Structure.calculateSize(Structure.java:735) at com.sun.jna.Structure.allocateMemory(Structure.java:191) at TestInterface$Parent.<init>(TestInterface.java:23) at Test.main(Test.java:22) Exception in thread "main"

I can't tell you where the the problem exactly lies because jna/jnalib/dist/src.zip (I use to attach to the jar file) is not up-to-date. Moreover I have some difficulties compiling jna from source and prefer to user the binary version of the lib.

Cheers.

On Dec 21, 2007, at 12:27 PM, Gabriele Forbiti wrote:

There's a bug in getNativeSize and getNativeAlignment; the code should check if value is null and if so, assign it the result of newInstance(type). I'll apply a patch shortly.

This has been committed to SVN, so using that's preferable to tweaking a workaround.