Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory field not handled in Structure #129

Closed
rnikander opened this issue Sep 28, 2012 · 0 comments
Closed

Memory field not handled in Structure #129

rnikander opened this issue Sep 28, 2012 · 0 comments

Comments

@rnikander
Copy link

Apparently fields of type Memory are not handled. The simple fix is to declare the field with type Pointer.

Example class that causes an error:

public class AudioBuffer extends Structure { 
    public int numberChannels; 
    public int dataByteSize; 
    public Memory data; 
    public AudioBuffer(int sz) { 
        data = new Memory(sz); 
        dataByteSize = sz; 
    } 
} 

Exception in thread "main" java.lang.IllegalArgumentException: Invalid
Structure field in class macaudio.AudioBufferList, field name
'buffers', class [Lmacaudio.AudioBuffer;: Invalid Structure field in
class macaudio.AudioBuffer, field name 'data', class
com.sun.jna.Memory: Type class com.sun.jna.Memory has unknown native
alignment

@twall twall closed this as completed in eaff9bd Oct 5, 2012
mstyura pushed a commit to mstyura/jna that referenced this issue Sep 9, 2024
Motivation:

To prevent failures to problems while downloading dependencies we shoud cache these

Modifications:

Add maven cache

Result:

No more failures due problems while downloading dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants