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

bridj register fails with -Xcheck:jni - FATAL ERROR in native method: Static field ID passed to JNI #83

Open
kevemueller opened this issue Dec 25, 2015 · 2 comments

Comments

@kevemueller
Copy link

while looking for reasons of why the call to C code fails, I set -Xcheck:jni on the JVM.
With this set, BridJ.register dies very early:

FATAL ERROR in native method: Static field ID passed to JNI
at org.bridj.JNI.bindJavaMethodsToCFunctions(Native Method)
at org.bridj.NativeEntities.addDefinitions(NativeEntities.java:149)
at org.bridj.CRuntime.register(CRuntime.java:468)
- locked <0x00000007ac30e868> (a org.bridj.cpp.CPPRuntime)
at org.bridj.CRuntime.register(CRuntime.java:345)
at org.bridj.BridJ.register(BridJ.java:355)
at org.bridj.BridJ.register(BridJ.java:192)
- locked <0x00000007abdf1998> (a java.lang.Class for org.bridj.BridJ)        

BridJ should not conflict with -Xcheck:jni

@CypraxPuch
Copy link

do you have some progress in this?

@Schwaller
Copy link

This is really annoying if you have a project which mixes JNI and BridJ. Please find a solution to this!

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

3 participants