java.lang.NullPointerException

JDK Bug System | Webbug Group | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When the pulse logger is on, usual QuantumToolkit.pulse(true) calls PaintCollector.renderAll() in between PulseLogger.pulseStart() and pulseEnd(). renderAll() calls PulseLogger.renderStart() and later renderEnd() is called from the render thread. So all render related pulse logging happens between renderStart and renderEnd. After the fix for RT-19342 in case of live resizing, PaintCollector.liveRepaintRenderJob() calls pulse (false) which prevent renderAll() from calling so renderStart/renderEnd don't get called. So the pulse(false) calls pulseStart, then pulseEnd and then when the render job is added (after the pulse), it starts to call PulseLogger render messages methods, which don't get recorded because renderStart was not called. Later we get warning "unexpected render thread activity". I see 2 or 3 possible solutions to this: 1) call renderStart() inside pulse() if (!collect), this is simplest solution, but it doesn't look right, because we don't actually start render yet. 2) pass some Runnable to the pulse, which in case of usual pulse will be collector.renderAll and in case of live resize all that stuff which now resides in that method. 3) decompose pulse method so the live resize render job can be insterted in the middle of the pulse. Last 2 options will actually change the order of execution, since the render will happen inside the pulse, which I think is a good thing, because it will be consistent with the usual pulse. The least intrusive will probably be option 2.

    JDK Bug System | 3 years ago | Vadim Pakhnushev
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sun.javafx.tk.quantum.GlassScene.frameRendered()
    2. com.sun.javafx
      RenderJob.run
      1. com.sun.javafx.tk.quantum.GlassScene.frameRendered(GlassScene.java:325)
      2. com.sun.javafx.tk.quantum.PaintCollector.done(PaintCollector.java:284)
      3. com.sun.javafx.tk.RenderJob.run(RenderJob.java:77)
      3 frames
    3. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    4. com.sun.javafx
      QuantumRenderer$PipelineRunnable.run
      1. com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame