6 messages in net.java.dev.jna.usersRe: [jna-users] Re: Failed build of r...
FromSent OnAttachments
Richard OteroDec 18, 2007 1:03 pm.log
Timothy WallDec 18, 2007 2:04 pm 
Timothy WallDec 18, 2007 8:09 pm 
Richard OteroDec 19, 2007 10:26 am.log
Timothy WallDec 19, 2007 10:46 am 
Richard OteroDec 19, 2007 5:51 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] Re: Failed build of repositoryActions...
From:Timothy Wall (twal@dev.java.net)
Date:Dec 19, 2007 10:46:32 am
List:net.java.dev.jna.users

There are two structures of interest. The first is the type information for the outer structure (the result of s.getTypeInfo()). The second is the type information provided for the inner structure, s.inner.getTypeInfo().

Info on p variable from testNestedStructureTypeInfo: Native Allocated Memory <0x2aaaf190b050> (24 bytes)

Dump 24 bytes of this memory to see what it looks like. You should expect this structure:

8 bytes - size, offset 0 2 bytes - alignment, offset 8 2 bytes - type = 13, offset 10 8 bytes - pointer, offset 16

If the last field is not null, dump 24 bytes from that address. This is the type information for each field; the first 8 bytes should be the same as s.inner.getTypeInfo().

What might be wrong here is the test may be using the wrong offset for the last pointer field in the above structure (which means it's just a faulty test and the code is probably working correctly).

Pointer els = p.getPointer(Pointer.SIZE + 4); // try changing the offset to Pointer.SIZE*2