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.