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

image data associated with cached nodes that are removed from a scene are not aggressively released

XMLWordPrintable

      The attached test case fails with NullPointerException after ~4,600 iterations:
      java.lang.NullPointerException
              at com.sun.scenario.effect.impl.prism.ps.PPSDrawable.create(PPSDrawable.java:54)
              at com.sun.scenario.effect.impl.prism.ps.PPSRenderer.createCompatibleImage(PPSRenderer.java:146)
              at com.sun.scenario.effect.impl.prism.ps.PPSRenderer.createCompatibleImage(PPSRenderer.java:60)
              at com.sun.scenario.effect.impl.ImagePool.checkOut(ImagePool.java:166)
              at com.sun.scenario.effect.impl.Renderer.getCompatibleImage(Renderer.java:118)
              at com.sun.scenario.effect.impl.prism.ps.PPSRenderer.getCompatibleImage(PPSRenderer.java:151)
              at com.sun.scenario.effect.impl.prism.ps.PPSOneSamplerPeer.filterImpl(PPSOneSamplerPeer.java:65)
              at com.sun.scenario.effect.impl.prism.ps.PPSEffectPeer.filter(PPSEffectPeer.java:52)
              at com.sun.scenario.effect.impl.state.LinearConvolveKernel.filterImageDatas(LinearConvolveKernel.java:412)
              at com.sun.scenario.effect.BoxShadow.filterImageDatas(BoxShadow.java:396)
              at com.sun.scenario.effect.FilterEffect.filter(FilterEffect.java:178)
              at com.sun.scenario.effect.Offset.filter(Offset.java:161)
              at com.sun.scenario.effect.Merge.filter(Merge.java:147)
              at com.sun.scenario.effect.DelegateEffect.filter(DelegateEffect.java:68)
              at com.sun.scenario.effect.impl.prism.PrEffectHelper.render(PrEffectHelper.java:138)
              at com.sun.javafx.sg.prism.NGNode$EffectFilter.render(NGNode.java:744)
              at com.sun.javafx.sg.prism.NGNode.renderEffect(NGNode.java:469)
              at com.sun.javafx.sg.prism.NGText.renderEffect(NGText.java:1105)
              at com.sun.javafx.sg.prism.NGNode$CacheFilter.impl_createImageData(NGNode.java:678)
              at com.sun.javafx.sg.BaseCacheFilter.render(BaseCacheFilter.java:131)
              at com.sun.javafx.sg.prism.NGNode$CacheFilter.render(NGNode.java:649)
              at com.sun.javafx.sg.prism.NGNode.renderCached(NGNode.java:462)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:175)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
              at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
              at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:179)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
              at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
              at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:187)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:179)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
              at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1108)
              at com.sun.javafx.tk.quantum.PaintRunnable.doPaint(PaintRunnable.java:215)
              at com.sun.javafx.tk.quantum.PaintRunnable.paintImpl(PaintRunnable.java:146)
              at com.sun.javafx.tk.quantum.PaintRunnable.run(PaintRunnable.java:307)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
              at com.sun.prism.render.RenderJob.run(RenderJob.java:29)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at com.sun.javafx.tk.quantum.QuantumRenderer$ObservedRunnable.run(QuantumRenderer.java:67)
              at java.lang.Thread.run(Thread.java:662)


      The test does create Text node with DropShadow effect and few controls which bound to DropShadow effect properties
      on every second iteration.
      The intend of this test was to reproduce memory leak found by Ensemble2AutoTest.
      However, the test fails with NullPointerException before reaching OOM.

      Steps to run the test:
      > java -cp "..." -Xms16m -Xmx16m EffectMemTest

            Unassigned Unassigned
            epavlova Ekaterina Pavlova
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Imported: