-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Service Pack2
A DESCRIPTION OF THE PROBLEM :
Execute the testcase using -Xcheck:jni. Applications making use of ImageIO get these warnings very frequently which makes it harder to debug their own JNI issues (it is difficult to separate JDK-caused warnings from user-code caused warnings).
ERROR MESSAGES/STACK TRACES THAT OCCUR :
>java -Xcheck:jni Testcase
Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCr
itical or Get/ReleaseStringCritical
Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCr
itical or Get/ReleaseStringCritical
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
public class Testcase
{
public static void main(String[] args)
{
try
{
Iterator<ImageReader> readers = ImageIO.getImageReadersByMIMEType("image/jpeg");
ImageReader reader = readers.next();
ImageInputStream in = ImageIO.createImageInputStream(new FileInputStream("filename.jpg"));
reader.setInput(in);
// The following line outputs "Warning: Calling other JNI functions in
// the scope of Get/ReleasePrimitiveArrayCritical or
// Get/ReleaseStringCritical" twice
BufferedImage image = reader.read(reader.getMinIndex());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
---------- END SOURCE ----------
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Service Pack2
A DESCRIPTION OF THE PROBLEM :
Execute the testcase using -Xcheck:jni. Applications making use of ImageIO get these warnings very frequently which makes it harder to debug their own JNI issues (it is difficult to separate JDK-caused warnings from user-code caused warnings).
ERROR MESSAGES/STACK TRACES THAT OCCUR :
>java -Xcheck:jni Testcase
Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCr
itical or Get/ReleaseStringCritical
Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCr
itical or Get/ReleaseStringCritical
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
public class Testcase
{
public static void main(String[] args)
{
try
{
Iterator<ImageReader> readers = ImageIO.getImageReadersByMIMEType("image/jpeg");
ImageReader reader = readers.next();
ImageInputStream in = ImageIO.createImageInputStream(new FileInputStream("filename.jpg"));
reader.setInput(in);
// The following line outputs "Warning: Calling other JNI functions in
// the scope of Get/ReleasePrimitiveArrayCritical or
// Get/ReleaseStringCritical" twice
BufferedImage image = reader.read(reader.getMinIndex());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-4528643 Native JPEG code makes JNI calls in scope of GetPrimitiveArrayCritical
-
- Resolved
-