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

Exception when printing contents of WebView

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • web

      When contents of WebView are printed, the following exception is thrown several times:

      java.lang.ClassCastException: com.sun.prism.d3d.D3DRTTexture cannot be cast to com.sun.prism.j2d.J2DRTTexture
      at com.sun.prism.j2d.J2DPrismGraphics.drawPixelsMasked(J2DPrismGraphics.java:1065)
      at com.sun.javafx.webkit.prism.WCGraphicsPrismContext$ClipLayer.render(WCGraphicsPrismContext.java:1260)
      at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.renderLayer(WCGraphicsPrismContext.java:158)
      at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreStateInternal(WCGraphicsPrismContext.java:176)
      at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreState(WCGraphicsPrismContext.java:189)
      at com.sun.webkit.graphics.GraphicsDecoder.decode(GraphicsDecoder.java:202)
      at com.sun.webkit.graphics.WCRenderQueue.decode(WCRenderQueue.java:69)
      at com.sun.webkit.WebPage.print(WebPage.java:1780)
      at javafx.scene.web.WebEngine$Printable$Peer.renderContent(WebEngine.java:1373)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
      at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1517)
      at com.sun.prism.j2d.print.J2DPrinterJob$J2DPageable.printNode(J2DPrinterJob.java:981)
      at com.sun.prism.j2d.print.J2DPrinterJob$J2DPageable.print(J2DPrinterJob.java:971)
      at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2037)
      at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1485)
      at com.sun.prism.j2d.print.J2DPrinterJob$PrintJobRunnable.run(J2DPrinterJob.java:714)
      at java.lang.Thread.run(Thread.java:724)

      Then, debug messages start being printed:

      D3D Vram Pool: 13 645 258 used (5,1%), 13 645 258 managed (5,1%), 268 435 456 total
      J2D Texture Pool: 98 304 used (0,0%), 98 304 managed (0,0%), 268 435 456 total
      70 total resources being managed
      6 permanent resources (8.6%)
      5 resources locked (7.1%)
      37 resources contain interesting data (52.9%)
      0 resources disappeared (0.0%)

            peterz Peter Zhelezniakov
            ilatyshe Irina Grineva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: