Skip to content

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

Description

@kevemueller

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions