java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

YouTrack | 8 months ago
  1. 0

    CCE (in casting to XRSurfaceData) in rendering

    YouTrack | 8 months ago
    java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
  2. 0

    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."

    JDK Bug System | 5 years ago | Yuri Nesterenko
    java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
  3. 0

    Off Screen Images - Creating, Saving

    Google Groups | 2 decades ago | Newnham, Leonard
    java.lang.ClassCastException: sun.awt.image.BytePackedRaster
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How can i work around the ClassCastException in java2d (Bug-ID 7172749)

    Stack Overflow | 12 months ago | tobi42
    java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
  6. 0

    GitHub comment 445#229410770

    GitHub | 5 months ago | ManfredKarrer
    java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

      at sun.java2d.xr.XRRenderer.validateSurface()
    2. Java RT
      SunGraphics2D.drawLine
      1. sun.java2d.xr.XRRenderer.validateSurface(XRRenderer.java:72)
      2. sun.java2d.xr.XRRenderer.drawLine(XRRenderer.java:87)
      3. sun.java2d.SunGraphics2D.drawLine(SunGraphics2D.java:2234)
      3 frames
    3. IDEA
      UIUtil.drawLine
      1. com.intellij.util.ui.UIUtil.drawLine(UIUtil.java:682)
      1 frame
    4. com.intellij.openapi
      EditorView.paint
      1. com.intellij.openapi.editor.impl.view.EditorPainter.a(EditorPainter.java:131)
      2. com.intellij.openapi.editor.impl.view.EditorPainter.paint(EditorPainter.java:91)
      3. com.intellij.openapi.editor.impl.view.EditorView.paint(EditorView.java:228)
      3 frames
    5. IDEA
      EditorComponentImpl.paintComponent
      1. com.intellij.openapi.editor.impl.EditorImpl.paint(EditorImpl.java:2167)
      2. com.intellij.openapi.editor.impl.EditorComponentImpl.paintComponent(EditorComponentImpl.java:218)
      2 frames
    6. Java RT
      JComponent.paint
      1. javax.swing.JComponent.paint(JComponent.java:1056)
      1 frame
    7. IDEA
      EditorComponentImpl.paint
      1. com.intellij.openapi.editor.impl.EditorComponentImpl.paint(EditorComponentImpl.java:117)
      1 frame
    8. Java RT
      JViewport.paint
      1. javax.swing.JComponent.paintChildren(JComponent.java:889)
      2. javax.swing.JComponent.paint(JComponent.java:1065)
      3. javax.swing.JViewport.paint(JViewport.java:728)
      3 frames
    9. IDEA
      JBViewport.paint
      1. com.intellij.ui.components.JBViewport.paint(JBViewport.java:165)
      1 frame
    10. Java RT
      JComponent.paintChildren
      1. javax.swing.JComponent.paintChildren(JComponent.java:889)
      2. javax.swing.JComponent.paint(JComponent.java:1065)
      3. javax.swing.JComponent.paintChildren(JComponent.java:889)
      4. javax.swing.JComponent.paint(JComponent.java:1065)
      5. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      6. javax.swing.JComponent.paintChildren(JComponent.java:889)
      7. javax.swing.JComponent.paint(JComponent.java:1065)
      8. javax.swing.JComponent.paintChildren(JComponent.java:889)
      9. javax.swing.JComponent.paint(JComponent.java:1065)
      10. javax.swing.JComponent.paintChildren(JComponent.java:889)
      11. javax.swing.JComponent.paint(JComponent.java:1065)
      12. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      13. javax.swing.JComponent.paintChildren(JComponent.java:889)
      14. javax.swing.JComponent.paint(JComponent.java:1065)
      15. javax.swing.JComponent.paintChildren(JComponent.java:889)
      16. javax.swing.JComponent.paint(JComponent.java:1065)
      17. javax.swing.JComponent.paintChildren(JComponent.java:889)
      18. javax.swing.JComponent.paint(JComponent.java:1065)
      19. javax.swing.JComponent.paintChildren(JComponent.java:889)
      20. javax.swing.JComponent.paint(JComponent.java:1065)
      21. javax.swing.JComponent.paintChildren(JComponent.java:889)
      21 frames
    11. DSL
      JBTabsImpl.paintChildren
      1. com.intellij.ui.tabs.impl.JBTabsImpl.paintChildren(JBTabsImpl.java:2350)
      1 frame
    12. Java RT
      JComponent.paint
      1. javax.swing.JComponent.paint(JComponent.java:1065)
      1 frame
    13. DSL
      JBTabsImpl.paint
      1. com.intellij.ui.tabs.impl.JBTabsImpl.paint(JBTabsImpl.java:2345)
      1 frame
    14. Java RT
      JComponent.paintChildren
      1. javax.swing.JComponent.paintChildren(JComponent.java:889)
      2. javax.swing.JComponent.paint(JComponent.java:1065)
      3. javax.swing.JComponent.paintChildren(JComponent.java:889)
      4. javax.swing.JComponent.paint(JComponent.java:1065)
      5. javax.swing.JComponent.paintChildren(JComponent.java:889)
      6. javax.swing.JComponent.paint(JComponent.java:1065)
      7. javax.swing.JComponent.paintChildren(JComponent.java:889)
      8. javax.swing.JComponent.paint(JComponent.java:1065)
      9. javax.swing.JComponent.paintChildren(JComponent.java:889)
      10. javax.swing.JComponent.paint(JComponent.java:1065)
      11. javax.swing.JComponent.paintChildren(JComponent.java:889)
      12. javax.swing.JComponent.paint(JComponent.java:1065)
      13. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      14. javax.swing.JComponent.paintChildren(JComponent.java:889)
      14 frames
    15. IDEA
      ToolWindowsPane.paintChildren
      1. com.intellij.openapi.wm.impl.ToolWindowsPane.paintChildren(ToolWindowsPane.java:192)
      1 frame
    16. Java RT
      Window.paint
      1. javax.swing.JComponent.paint(JComponent.java:1065)
      2. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      3. javax.swing.JComponent.paintChildren(JComponent.java:889)
      4. javax.swing.JComponent.paint(JComponent.java:1065)
      5. javax.swing.JComponent.paintChildren(JComponent.java:889)
      6. javax.swing.JComponent.paint(JComponent.java:1065)
      7. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      8. javax.swing.JComponent.paintChildren(JComponent.java:889)
      9. javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
      10. javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
      11. javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
      12. javax.swing.RepaintManager.paint(RepaintManager.java:1272)
      13. javax.swing.JComponent.paint(JComponent.java:1042)
      14. java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
      15. sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:79)
      16. sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
      17. java.awt.Container.paint(Container.java:1975)
      18. java.awt.Window.paint(Window.java:3904)
      18 frames
    17. IDEA
      IdeFrameImpl.paint
      1. com.intellij.openapi.wm.impl.IdeFrameImpl.paint(IdeFrameImpl.java:548)
      1 frame
    18. Java RT
      EventQueue.dispatchEvent
      1. javax.swing.RepaintManager$4.run(RepaintManager.java:842)
      2. javax.swing.RepaintManager$4.run(RepaintManager.java:814)
      3. java.security.AccessController.doPrivileged(Native Method)
      4. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      5. javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
      6. javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
      7. javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
      8. javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
      9. javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
      10. java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      11. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      12. java.awt.EventQueue.access$500(EventQueue.java:97)
      13. java.awt.EventQueue$3.run(EventQueue.java:709)
      14. java.awt.EventQueue$3.run(EventQueue.java:703)
      15. java.security.AccessController.doPrivileged(Native Method)
      16. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      17. java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      17 frames
    19. IDEA
      IdeEventQueue.dispatchEvent
      1. com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:863)
      2. com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
      3. com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:392)
      3 frames
    20. Java RT
      Dialog.show
      1. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      2. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      3. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
      4. java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
      5. java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
      6. java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
      7. java.security.AccessController.doPrivileged(Native Method)
      8. java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
      9. java.awt.Dialog.show(Dialog.java:1084)
      9 frames
    21. IDEA
      ShowSettingsUtilImpl.editConfigurable
      1. com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
      2. com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
      3. com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1670)
      4. com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1608)
      5. com.intellij.openapi.options.newEditor.SettingsDialog.access$001(SettingsDialog.java:42)
      6. com.intellij.openapi.options.newEditor.SettingsDialog$1.run(SettingsDialog.java:81)
      7. com.intellij.openapi.project.DumbPermissionServiceImpl.allowStartingDumbModeInside(DumbPermissionServiceImpl.java:37)
      8. com.intellij.openapi.project.DumbService.allowStartingDumbModeInside(DumbService.java:283)
      9. com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:78)
      10. com.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1623)
      11. com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:228)
      12. com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:189)
      13. com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:178)
      14. com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:162)
      14 frames
    22. com.jetbrains.plugins
      ConfigureDeploymentOptionsAction.actionPerformed
      1. com.jetbrains.plugins.webDeployment.actions.ConfigureDeploymentOptionsAction.actionPerformed(ConfigureDeploymentOptionsAction.java:29)
      1 frame
    23. IDEA
      ActionMenuItem$ActionTransmitter.actionPerformed
      1. com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
      2. com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:311)
      3. com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
      4. com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
      5. com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:281)
      5 frames
    24. Java RT
      AbstractButton.fireActionPerformed
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      1 frame
    25. IDEA
      BegMenuItemUI$MyMouseInputHandler.mouseReleased
      1. com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109)
      2. com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
      3. com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
      4. com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
      4 frames
    26. Java RT
      EventQueue.dispatchEvent
      1. java.awt.Component.processMouseEvent(Component.java:6533)
      2. javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      3. java.awt.Component.processEvent(Component.java:6298)
      4. java.awt.Container.processEvent(Container.java:2236)
      5. java.awt.Component.dispatchEventImpl(Component.java:4889)
      6. java.awt.Container.dispatchEventImpl(Container.java:2294)
      7. java.awt.Component.dispatchEvent(Component.java:4711)
      8. java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
      9. java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
      10. java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
      11. java.awt.Container.dispatchEventImpl(Container.java:2280)
      12. java.awt.Window.dispatchEventImpl(Window.java:2746)
      13. java.awt.Component.dispatchEvent(Component.java:4711)
      14. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      15. java.awt.EventQueue.access$500(EventQueue.java:97)
      16. java.awt.EventQueue$3.run(EventQueue.java:709)
      17. java.awt.EventQueue$3.run(EventQueue.java:703)
      18. java.security.AccessController.doPrivileged(Native Method)
      19. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      20. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      21. java.awt.EventQueue$4.run(EventQueue.java:731)
      22. java.awt.EventQueue$4.run(EventQueue.java:729)
      23. java.security.AccessController.doPrivileged(Native Method)
      24. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      25. java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      25 frames
    27. IDEA
      IdeEventQueue.dispatchEvent
      1. com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:863)
      2. com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:660)
      3. com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:392)
      3 frames
    28. Java RT
      EventDispatchThread.run
      1. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      2. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      3. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      4. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      5. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      6. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      6 frames