JDK-7044758 : test/closed/javax/imageio/plugins/jpeg/JpegPremultAlphaTest.java fails on OpenJDK
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7,8,9,10
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,os_x
  • CPU: generic
  • Submitted: 2011-05-13
  • Updated: 2018-06-15
  • Resolved: 2018-06-15
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
java/re/jdk/1.7.0/promoted/all/b141/openjdk/j2sdk-image/solaris-sparc/bin/java -client JpegPremultAlphaTest
Test for TYPE_INT_RGB
sample[0]=20
sample[1]=40
sample[2]=60
Test for TYPE_INT_ARGB
sample[0]=20
sample[1]=40
sample[2]=60
sample[3]=80
javax.imageio.IIOException: Invalid argument to native writeImage
        at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method)
        at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:1055)
        at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:357)
        at javax.imageio.ImageWriter.write(ImageWriter.java:615)
        at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
        at javax.imageio.ImageIO.write(ImageIO.java:1578)
        at JpegPremultAlphaTest.doTest(JpegPremultAlphaTest.java:62)
        at JpegPremultAlphaTest.main(JpegPremultAlphaTest.java:42)
Exception in thread "main" java.lang.RuntimeException: Test failed.
        at JpegPremultAlphaTest.doTest(JpegPremultAlphaTest.java:72)
        at JpegPremultAlphaTest.main(JpegPremultAlphaTest.java:42)

Comments
This test requires support that OpenJDK does not have and in JDK 11 the test was deleted as part of 8204187: Remove proprietary JPEG code from javax.imageio
15-06-2018

The following cases have the same issue on win10 x64 and oel7.2 redhat x64 with openJDK 9 b160(64bit) 2D_ImageIOTiger/ImageIOWriterCompressionTest 2D_ImageIOTiger/ImageWriterTest 2D_ImageIOTiger/WriterCompressionTypeTest 2D_ImageIOTiger/ImageWriteParamTest 2D_ImageIOTiger/WriterProgressiveEncodeTest 2D_ImageIO/Render2DTest
17-03-2017

With Openjdk9 b160, very similar stack RULE "2D_ImageIO/AutoPipedStreamsTest" Exception javax.imageio.IIOException: Invalid argument to native writeImage RULE "2D_ImageIOTiger/WriterCacheRemovalTest" Exception javax.imageio.IIOException: Invalid argument to native writeImage
14-03-2017

Does it affect JDK 9 ?
22-07-2015

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
29-08-2013

oel6.2-uek-x64 OpenJdk8b102(64bit) 2D_ImageIOTiger/ImageIOWriterCompressionTest 2D_ImageIOTiger/ImageWriterTest 2D_ImageIOTiger/WriterCompressionTypeTest 2D_ImageIOTiger/ImageWriteParamTest 2D_ImageIOTiger/WriterProgressiveEncodeTest 2D_ImageIO/Render2DTest They have the same issue.
16-08-2013

win7-x86 OpenJdk8b102(32bit) 2D_ImageIO/Render2DTest 2D_ImageIOTiger/ImageWriteParamTest 2D_ImageIOTiger/ImageWriterTest 2D_ImageIOTiger/WriterCompressionTypeTest 2D_ImageIOTiger/WriterProgressiveEncodeTest 2D_ImageIOTiger/ImageIOWriterCompressionTest They have same issue.
16-08-2013

Converted "8-client-defer-candidate" label to "8-defer-request" by SQE' OK.
15-08-2013

*This is anti-deferral criteria list*: - P2 -------------- Engineering's Criteria ------------------------------------- - tck-red labeled - conformance labeled - P3 regressions reported/labeled against jdk8 - findbugs, parfait, eht labeled bugs - CAP <1 year reported - netbeans <1 year reported Victor ----------------- SQE's OK --------------------------------- Yes, we are ok with that thanks, Mikhail
15-08-2013

to aurora RULE 2D_ImageIOTiger/AutoImageWriterTest Exception javax.imageio.IIOException: Invalid argument to native writeImage
08-07-2013

EVALUATION The OpenJDK JPEG library has a mismatch with the Java code for the enum values for Color Space IDs. 1) There are several IDs for PhotoYCC, PhotoYCCA, YcYbYrA, RGBA that are not supported by the standard JPEG library 2) JCS_YCCK is defined by the standard library as enum value 5 but the color code for it defined in JPEG.java is 11. Hmm .. and even with the 4 extra closed color spaces it'll only be 9. That seems like a bug in JPEG.java to define it differently than the IJG library. So as far as I can see this part is not only an openjdk issue although this test doesn't show it up. Maybe we never use this value ?
13-05-2011