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

CCE: sun.java2d.NullSurfaceData cannot be cast to sun.java2d.opengl.OGLSurfaceData

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u72, 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • Introduced In Version:
    • Resolved In Build:
      b124
    • CPU:
      x86
    • OS:
      os_x

      Backports

        Description

        We have the following exception in one of our IDEA platform based projects

        sun.java2d.NullSurfaceData cannot be cast to sun.java2d.opengl.OGLSurfaceData


        java.lang.ClassCastException: sun.java2d.NullSurfaceData cannot be cast to sun.java2d.opengl.OGLSurfaceData
        at sun.java2d.opengl.OGLMaskFill.validateContext(OGLMaskFill.java:70)
        at sun.java2d.pipe.BufferedMaskFill.MaskFill(BufferedMaskFill.java:86)
        at sun.java2d.pipe.AlphaColorPipe.renderPathTile(AlphaColorPipe.java:55)
        at sun.java2d.pipe.AAShapePipe.renderTiles(AAShapePipe.java:201)
        at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:159)
        at sun.java2d.pipe.AAShapePipe.draw(AAShapePipe.java:64)
        at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
        at sun.java2d.pipe.PixelToShapeConverter.drawPolygon(PixelToShapeConverter.java:125)
        at sun.java2d.SunGraphics2D.drawPolygon(SunGraphics2D.java:2372)
        at com.intellij.ui.Graphics2DDelegate.drawPolygon(Graphics2DDelegate.java:147)
        at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.drawDirectedBox(EditorGutterComponentImpl.java:1204)
        at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.drawFoldingAnchor(EditorGutterComponentImpl.java:1171)
        at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.doPaintFoldingTree(EditorGutterComponentImpl.java:1095)
        at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.paintFoldingTree(EditorGutterComponentImpl.java:471)
        at com.intellij.openapi.editor.impl.EditorGutterComponentImpl.paint(EditorGutterComponentImpl.java:319)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
        at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
        at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
        at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
        at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
        at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
        at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
        at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:835)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:670)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:392)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

          Activity

          Hide
          avu Alexey Ushakov added a comment -
          Sometimes rendering is performed into surface of wrong type, so we need to recreate it by throwing InvalidPipeException. The exception is caught at upper level and the surface of appropriate type is created. Similar approach is used in OpenGL and D3D pipeline.
          Show
          avu Alexey Ushakov added a comment - Sometimes rendering is performed into surface of wrong type, so we need to recreate it by throwing InvalidPipeException. The exception is caught at upper level and the surface of appropriate type is created. Similar approach is used in OpenGL and D3D pipeline.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/e270820669ad
          User: serb
          Date: 2016-06-06 13:41:26 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/e270820669ad User: serb Date: 2016-06-06 13:41:26 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/e270820669ad
          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/e270820669ad User: lana Date: 2016-06-22 19:53:10 +0000

            People

            • Assignee:
              avu Alexey Ushakov
              Reporter:
              avu Alexey Ushakov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: