Describe the issue
When passing down a float variable from a native JNI method to the JVM layer, the value in JVM will always be 0.0f instead of the actual float value in JNI. The linked project uses env->NewObject() to construct a new instance of a Java class while passing a float value to the constructor. The value of this float in the Java-side is always 0.0f instead of 1.0f.
Steps to reproduce the issue
Describe GraalVM and your environment:
More details
There are no other issues or stack traces. We can only see that the value of the floats are always 0.0f. When running the program directly via java, the float values are passed down correctly.
@pejovica any update on the issue please ?????
As far as I know, this has been fixed with the following commit: https://github.com/oracle/graal/commit/fc2b286614994f9dd60748c96276c6ba62d4b271
I agree, this looks very much like it's caused by the same underlying problem as #2397 . @tiainen could you test the newest development build and close this issue that resolves it? Thank you.
I can verify that the issue has been resolved with the latest development build.
Most helpful comment
As far as I know, this has been fixed with the following commit: https://github.com/oracle/graal/commit/fc2b286614994f9dd60748c96276c6ba62d4b271