-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
64 bit issues #9
Comments
The Heisenberg issues are more likely GC-related, but may also depend on the state of the C stack. In most cases, an object explicitly passed down to native code will not be GCd for at least the duration of the call, since a reference to the object will exist until the native function returns. You need to keep an explicit reference to anything that needs to survive across multiple function calls (e.g. callback objects, Memory, or Structures). Without the context of the crash, however, it's hard to say anything more specific. |
Thanks, I double checked the code and found that there was a structure that had a void* field being declared as an int on the Java side. I changed it to NativeLong and everything worked. I just missed it when looking through the code to port to 64 bit. Thanks for your reply though. |
Motivation: We should include docker / docker-compose files to build the lib Modifications: Add docker / docker-compose files Result: Easily be able to build via docker
I have an app that uses JNA to call a couple native libraries on Win32 and Linux 32 platforms. However, I am having trouble running the same code on Win7 64 and Linux 64.
The C++ libraries have been compiled on the 64 bit platforms.
Are there any other tricks needed or pitfalls to be aware of to get running on 64 bit platforms?
Are there any known issues with the garbage collection on the 64 bit platforms? Is there a way to make sure the objects I am sending down to the native code do not get garbage collected until after I leave a particular code block? The reason I ask this is on Linux I can step through via the debugger and everything works properly, but if I just run it crashes. I still need to confirm this is the case in Win7 64.
Also, I'm leaning more to the garbage collection because I do not have any long data types any where either.
Any ideas are welcome.
Thanks!
The text was updated successfully, but these errors were encountered: