Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8256285 | jfx11.0.10 | Ambarish Rapte | P3 | Resolved | Fixed |
ADDITIONAL SYSTEM INFORMATION :
java 8u161.
Ubuntu 16.04.2 64bit
A DESCRIPTION OF THE PROBLEM :
2019-02-19 00:25:50,885 [23936] [QuantumRenderer-0] ERROR - java.lang.NullPointerException
2019-02-19 00:25:50,886 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.GlassScene.frameRendered(GlassScene.java:325)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.PaintCollector.done(PaintCollector.java:284)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.RenderJob.run(RenderJob.java:77)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.lang.Thread.run(Thread.java:748)
I see this has been reported before here:
https://bugs.openjdk.java.net/browse/JDK-8163360
but closed as no test case was submitted. I'm not able to submit one either, but have a suggestion on how this could occur by looking at the code in GlassScene.
There is a null check in the offending method:
public final synchronized void frameRendered() {
if (scenePaintListener != null) {
scenePaintListener.frameRendered();
}
}
Notice this method is synchronized and dispose, which set's scenePaintListener to null, isn't.
Therefore I think what has happened here is:
Thread 1: Null check passes
Thread 2: dispose() set's to null
Thread 1: calls method on null reference
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Happened twice, unable to reproduce.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No crash
ACTUAL -
Crash/Stall.
FREQUENCY : rarely
java 8u161.
Ubuntu 16.04.2 64bit
A DESCRIPTION OF THE PROBLEM :
2019-02-19 00:25:50,885 [23936] [QuantumRenderer-0] ERROR - java.lang.NullPointerException
2019-02-19 00:25:50,886 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.GlassScene.frameRendered(GlassScene.java:325)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.PaintCollector.done(PaintCollector.java:284)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.RenderJob.run(RenderJob.java:77)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
2019-02-19 00:25:50,887 [23936] [QuantumRenderer-0] ERROR - at java.lang.Thread.run(Thread.java:748)
I see this has been reported before here:
https://bugs.openjdk.java.net/browse/JDK-8163360
but closed as no test case was submitted. I'm not able to submit one either, but have a suggestion on how this could occur by looking at the code in GlassScene.
There is a null check in the offending method:
public final synchronized void frameRendered() {
if (scenePaintListener != null) {
scenePaintListener.frameRendered();
}
}
Notice this method is synchronized and dispose, which set's scenePaintListener to null, isn't.
Therefore I think what has happened here is:
Thread 1: Null check passes
Thread 2: dispose() set's to null
Thread 1: calls method on null reference
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Happened twice, unable to reproduce.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No crash
ACTUAL -
Crash/Stall.
FREQUENCY : rarely
- backported by
-
JDK-8256285 NullPointerException in GlassScene.java at line 325
-
- Resolved
-
- links to