Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7172749

Xrender: Class cast exception in 2D code running an AWT regression test

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b124
    • CPU:
      x86
    • OS:
      linux, solaris_11

      Backports

        Description

        Try to run a manual regression test closed/java/awt/event/MouseEvent/MouseEventsDuringDrag on XToolkit with jdk8 (circa b38). Chance is, you will get
         
        java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
        at sun.java2d.xr.XRRenderer.validateSurface(XRRenderer.java:65)
        at sun.java2d.xr.XRRenderer.drawLine(XRRenderer.java:84)
        at sun.java2d.SunGraphics2D.drawLine(SunGraphics2D.java:2137)
        at sun.awt.X11.XTextAreaPeer$BevelBorder.paintBorder(XTextAreaPeer.java:1233)
        at javax.swing.border.CompoundBorder.paintBorder(CompoundBorder.java:117)
        at javax.swing.JComponent.paintBorder(JComponent.java:947)
        at javax.swing.JComponent.paint(JComponent.java:1055)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5224)
        at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1486)
        at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1417)
        at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:306)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1210)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5172)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4983)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4995)
        at sun.awt.X11.XTextAreaPeer$AWTTextArea.repaintNow(XTextAreaPeer.java:994)
        at sun.awt.X11.XTextAreaPeer.repaintText(XTextAreaPeer.java:283)
        at sun.awt.X11.XTextAreaPeer.setText(XTextAreaPeer.java:461)
        at java.awt.TextComponent.setText(TextComponent.java:239)
        at TestDialog.printInstructions(MouseEventsDuringDrag.java:266)
        at Sysout.createDialogWithInstructions(MouseEventsDuringDrag.java:203)
        at MouseEventsDuringDrag.init(MouseEventsDuringDrag.java:107)
        at com.sun.javatest.regtest.AppletWrapper$AppletRunnable.run(AppletWrapper.java:150)
        at java.lang.Thread.run(Thread.java:722)


        Linux Ubuntu 11.10 x586
        (Ubuntu) version of libxrender1 is 1:0.9.6-2 while the last note from Changelog is: "Bump Standards-Version to 3.9.2."

          Issue Links

            Activity

            Hide
            yan Yuri Nesterenko added a comment -
            this is with Jake, so jdk9
            RULE 2D_ImageIOTiger/ImageIOWriterCompressionTest Exception java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData (in module: java.desktop) cannot be cast to sun.java2d.xr.XRSurfaceData (in module: java.desktop)
            Show
            yan Yuri Nesterenko added a comment - this is with Jake, so jdk9 RULE 2D_ImageIOTiger/ImageIOWriterCompressionTest Exception java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData (in module: java.desktop) cannot be cast to sun.java2d.xr.XRSurfaceData (in module: java.desktop)
            Hide
            yan Yuri Nesterenko added a comment -
            RULE closed/java/awt/dnd/FileDialogDropTargetTest/FileDialogDropTargetTest.java Exception java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData
            Show
            yan Yuri Nesterenko added a comment - RULE closed/java/awt/dnd/FileDialogDropTargetTest/FileDialogDropTargetTest.java Exception java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData
            Hide
            mentlich Martin Entlicher added a comment -
            I get this exception every time my Ubuntu notebook is woke up from sleep. This does not happen with JDK 7, but happens every time with JDK 8. As a result of a series of these exceptions, UI of the application is not fully drawn.
            Show
            mentlich Martin Entlicher added a comment - I get this exception every time my Ubuntu notebook is woke up from sleep. This does not happen with JDK 7, but happens every time with JDK 8. As a result of a series of these exceptions, UI of the application is not fully drawn.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/2bafa85a456b
            User: serb
            Date: 2016-05-26 18:55:37 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/2bafa85a456b User: serb Date: 2016-05-26 18:55:37 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/2bafa85a456b
            User: lana
            Date: 2016-06-22 19:53:10 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/2bafa85a456b User: lana Date: 2016-06-22 19:53:10 +0000

              People

              • Assignee:
                prr Philip Race
                Reporter:
                yan Yuri Nesterenko
              • Votes:
                2 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: