United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6997116 The case automatically failed due to java.lang.ClassCastException.
JDK-6997116 : The case automatically failed due to java.lang.ClassCastException.

Details
Type:
Bug
Submit Date:
2010-11-03
Status:
Resolved
Updated Date:
2013-06-26
Project Name:
JDK
Resolved Date:
2011-10-29
Component:
client-libs
OS:
windows_vista,windows_xp,windows
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
7,7u10
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
Bug description:The case automatically failed due to java.lang.ClassCastException.
Testsuite name: AWT 
JDK/JRE tested: jdk-7-ea-bin-b116-windows-amd64-28_oct_2010.exe 
OS/architecture:winxp-x64
Reproducible: Always
Reproducible on machine: 
[If sometimes] Also reproducible on machine: 
Is it a platform specific regression: N 
[If yes] Is it a new platform support: N 
[If yes] Regression relative to OS version: 
Is it a Regression: Y
[If yes] Regression introduced in release/build: 7b115
[If yes] Test result on FCS: See the actual result. 
Test run log location: http://jsqalab.sfbay.sun.com/results/Evergreen/7/automation/7b116/awt/automation/winxp-x64/Standalone_awt_2010_11_02_14_57_06/Administrator.Windows_XP.amd64/ImageTransferTest.html_copy_1/ImageTransferTest.html.log
Test run result location: http://jsqalab.sfbay.sun.com/results/Evergreen/7/automation/7b116/awt/automation/winxp-x64/Standalone_awt_2010_11_02_14_57_06/Administrator.Windows_XP.amd64/ImageTransferTest.html_copy_1/
Steps to reproduce:
1.	Install test bundle JDK7b114 from
http://jre.sfbay/java/re/jdk/7/promoted/ea/b116/bundles/windows-amd64/
to  C:/Java/
2.	Install Jtreg from http://jre.sfbay.sun.com/java/re/jtreg/4.1/promoted/latest/binaries/latest/jtreg/
 locate at C:/jct4.1
3.	Download and unzip jdk7 ws from 
http://hg.openjdk.java.net/jdk7/awt/jdk
to C:/reg
4.	Modify the reg_awt.sh as:
export JAVA_HOME=C:/Java/jdk1.7.0
C:/jct4.1/jtreg/win32/bin/jtreg -g -v -m -jdk:C:/Java/jdk1.7.0 -r:C:/reg/report -w:C:/reg/work C:/reg/7_awt_reg/test
5.	Make printer work fine. 
6.	From command line, run sh reg_awt.sh
7.	After Jtreg launched, choose Current Configuration from View Filter:Status of ,  
8.	Choose  New Configuration from Configure of menu bar.
9.	Choose Yes form Specify Test to Run ,click Next button then choose From a List a File,click next button and click Browse button to choose C:/awt.list.
10.	Click next button and select the default option.
11.	Choose Yes button from Specify Keyword? then click next button and type manual on the textfield of Response and click Done button to save a *jti file.
12.	Click StartRunning Test  button to run the case.

Actual behavior:
  The case automatically failed due to java.lang.ClassCastException.

Log file:
java.lang.ClassCastException: [S cannot be cast to [I
at java.awt.image.DirectColorModel.getRGB(DirectColorModel.java:714)
at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(CustomComponent.java:145)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:560)
at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:541)
at sun.java2d.loops.MaskBlit$General.MaskBlit(MaskBlit.java:189)
at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Blit.java:204)
at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:953)
at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:575)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:71)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1008)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3062)
at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:808)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1015)
at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3062)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3047)
at ImageTransferGUI$TestFrame.paint(ImageTransferGUI.java:193)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:660)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
STATUS:Failed.Applet thread threw exception: java.lang.ClassCastException: [S cannot be cast to [I

Verify:
1.On platform  winvista x86  with same build the case is passed.
2.On the same platform with build 7b115 also has same issue.

                                    

Comments
SQE is ok to defer to 7u12. Does not seem to be Win 8 specific anymore. Removing the win8 label.
                                     
2012-11-01
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/java2d_data/8/6997116
                                     
2011-10-17
EVALUATION

The class cast exception here is caused by an inconsistent pair
 of color model and raster created by D3DSurfaceData. It happens
 if BITMASK transparency is used (i.e. alpha mask is 0x1000000).
 In this case, due to incorrect condition which allows INT transfer
 type  only for 24bpp and 32bpp cases), we select USHORT transfer
 type for created raster.

 Suggested fix just makes produced pair of color model and raster
 a bit more consist.
                                     
2011-10-17
WORK AROUND

-Dsun.java2d.d3d=false
                                     
2012-07-24
Adding win8 label as JDK-7194578 is Windows 8 specific and closed as Duplicate of this one
                                     
2012-10-18



Hardware and Software, Engineered to Work Together