JDK-8047066 : Test test/sun/awt/image/bug8038000.java fails with ClassCastException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2014-06-17
  • Updated: 2018-03-21
  • Resolved: 2014-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u40Fixed 9 b26Fixed openjdk7uFixed
Related Reports
Duplicate :  
Description
Testsuite name: Regression 
Test name(s):test/sun/awt/image/bug8038000.java
JDK tested: jdk1.8.0_25b01
OS tested: Mac x86_64
Is it a regression? No 
Regression introduced in release/build: N/A 
  
Is it platform specific? no 
The is failure reproduced: always 

Exception in thread "main" java.lang.ClassCastException: java.awt.image.SinglePixelPackedSampleModel cannot be cast to java.awt.image.ComponentSampleModel
	at sun.java2d.cmm.lcms.LCMSImageLayout.createImageLayout(LCMSImageLayout.java:389)
	at sun.java2d.cmm.lcms.LCMSTransform.colorConvert(LCMSTransform.java:465)
	at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:571)
	at com.bugme.bug8038000.checkOp(bug8038000.java:111)
	at com.bugme.bug8038000.checkOps(bug8038000.java:88)
	at com.bugme.bug8038000.main(bug8038000.java:45)
Comments
Changeset includes addition of this bugid to the regression test which covers this issue. A "noreg" Label is not needed.
10-10-2014

The existing regression test test/sun/awt/image/bug8038000.java could be used to verify the fix.
08-07-2014

Created fix review: http://cr.openjdk.java.net/~anashaty/8047066/9/webrev.00/
18-06-2014

Not reproducible with 7u66. The LCMSImageLayout has been totally refactored in jdk8 so this is not surprising.
18-06-2014

Failed a bug on this behavior JDK-8047220
18-06-2014

please evaluate as connected to 8038000
18-06-2014

I have verified in jdk 8u20 and jdk8u5 . The same exception i was able to reproduce in windows and mac But there was another exception captured in Raster.createInterleavedRaster(int dataType,int w, int h, int scanlineStride, int pixelStride,int bandOffsets[],Point location) when the strideline > width it throws a Exception in thread "main" java.awt.image.RasterFormatException: Incorrect scanline stride: 2000 at sun.awt.image.ByteBandedRaster.verify(ByteBandedRaster.java:760) at sun.awt.image.ByteBandedRaster.<init>(ByteBandedRaster.java:162) at sun.awt.image.ByteBandedRaster.<init>(ByteBandedRaster.java:102) at java.awt.image.Raster.createBandedRaster(Raster.java:716) at java.awt.image.Raster.createBandedRaster(Raster.java:417) at com.bugme.bug8038000.checkOps(bug8038000.java:63) at com.bugme.bug8038000.main(bug8038000.java:45)
18-06-2014

please run this new case on 8u20 and 8 GA and provide results
17-06-2014

This is a new case added in 8u25 and its reproducible in Windows .
17-06-2014

Is this issue reproduced against 8u20? Is it reproduced on other OS than MacOSX?
17-06-2014

RULE sun/awt/image/bug8038000.java Exception java.lang.ClassCastException: java.awt.image.SinglePixelPackedSampleModel cannot be cast to java.awt.image.ComponentSampleModel
17-06-2014