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

Two NPE's in Prism related to Canvas

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      JavaFX 2.2, Windows 7

      Description

      I get these two NPE's sometimes (the first one only once, the second one can repeat dozens of times).

      They seem to occur when using Canvas extensively (in my case, rendering 1920x1080 video on it, so 25 frames per second, at 10 MB / frame each).

      When this happens, the Canvas content disappears temporarily, but returns after a few seconds (and the NPE's stop).

      Please investigate :)

      java.lang.NullPointerException
      at com.sun.prism.impl.BaseGraphics.drawTextureVO(BaseGraphics.java:418)
      at com.sun.prism.impl.BaseGraphics.drawTexture(BaseGraphics.java:340)
      at com.sun.prism.impl.ps.BaseShaderGraphics.drawTexture(BaseShaderGraphics.java:104)
      at com.sun.prism.impl.BaseGraphics.drawTexture(BaseGraphics.java:331)
      at com.sun.javafx.sg.prism.NGCanvas.renderStream(NGCanvas.java:515)
      at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:320)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:204)
      at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:204)
      at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:117)
      at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:175)
      at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:73)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
      at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
      at com.sun.prism.render.RenderJob.run(RenderJob.java:37)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:98)
      at java.lang.Thread.run(Unknown Source)

      java.lang.NullPointerException
      at com.sun.prism.impl.BaseResourceFactory.clearTextureCache(BaseResourceFactory.java:47)
      at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:102)
      at com.sun.javafx.sg.prism.NGCanvas.renderStream(NGCanvas.java:512)
      at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:320)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:204)
      at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:204)
      at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:420)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:187)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1145)
      at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:117)
      at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:175)
      at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:73)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
      at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
      at com.sun.prism.render.RenderJob.run(RenderJob.java:37)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:98)
      at java.lang.Thread.run(Unknown Source)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ckyang Chien Yang (Inactive)
                Reporter:
                jhendrikx John Hendrikx
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: