To reproduce this, run the attached test program with `-Xcheck:jni`:
$ java -Xcheck:jni ImageLoaderTest
Compare the two attached images:
image-good : run without -Xcheck:jni
image-check-jni : run with -Xcheck:jni
Note that the size of the jpg image is correct when run with -Xcheck:jni but the image itself is all black. Possibly the JNI upcall to write the data isn't working correctly.
The png image is correctly loaded in both cases, which is not surprising since our PNG loader is entirely in Java code.
$ java -Xcheck:jni ImageLoaderTest
Compare the two attached images:
image-good : run without -Xcheck:jni
image-check-jni : run with -Xcheck:jni
Note that the size of the jpg image is correct when run with -Xcheck:jni but the image itself is all black. Possibly the JNI upcall to write the data isn't working correctly.
The png image is correctly loaded in both cases, which is not surprising since our PNG loader is entirely in Java code.
- relates to
-
JDK-8309625 Some JNI calls made without checking exceptions in jpegloader
- Open