9 messages in net.java.dev.jna.users[jna-users] Nested Structure Issue
FromSent OnAttachments
Peter SchwarzSep 22, 2008 2:26 pm 
Peter SchwarzSep 22, 2008 4:14 pm 
Timothy WallSep 22, 2008 7:24 pm 
Peter SchwarzSep 22, 2008 7:27 pm 
Timothy WallSep 22, 2008 7:37 pm 
Peter SchwarzSep 22, 2008 7:57 pm 
Timothy WallSep 22, 2008 9:05 pm 
Peter SchwarzSep 23, 2008 3:14 pm 
Timothy WallSep 23, 2008 4:54 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] Nested Structure IssueActions...
From:Peter Schwarz (psch@gemini.edu)
Date:Sep 22, 2008 2:26:04 pm
List:net.java.dev.jna.users

Hi,

I¹m currently working on adding mappings for structures (PyObject and PyTypeObject to be specific). The PyObject is pretty simple: a ref count and a pointer to its type. The PyTypeObject is much more complicated: Many arrays of structs, function pointers, etc.

I implemented the type object out as far as I need (the ability to define methods, members, etc), and I very quickly started getting errors. In order to find the culprit, I began by removing all the fields, and then adding them back one by one. I started with the int values, and my tests still passed. Once I added back the first String field, the tests fail in the native library with the following error:

Invalid memory access of location 00000001 rip=105fcee5

I¹m not sure what might be causing this sort of error when defining Structure. Any ideas?

Cheers,

Peter