RFR: 8223296: NullPointerException in GlassScene.java at line 325

Ambarish Rapte arapte at openjdk.java.net
Tue Dec 10 07:03:39 UTC 2019


Issue: NPE in GlassScene.frameRendered().

Cause: scenePaintListener is set in setTKScenePaintListener(), used in frameRendered() and 
set to null in dispose().
setTKScenePaintListener() and dispose() are called on JavaFX Application Thread and 
frameRendered() is called by QuantumRenderer thread.
setTKScenePaintListener() and frameRendered() are synchronized but dispose() is not.

Fix:
dispose() should use the synchronized setTKScenePaintListener() to set scenePaintListener to null.

Verification:
This is a very rare issue and cannot be reliably reproduced with a test case.

-------------

Commits:
 - ca95597f: [WIP]8223296: NullPointerException in GlassScene.java at line 325

Changes: https://git.openjdk.java.net/jfx/pull/64/files
 Webrev: https://webrevs.openjdk.java.net/jfx/64/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8223296
  Stats: 3 lines in 1 file changed: 1 ins; 1 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/64.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/64/head:pull/64

PR: https://git.openjdk.java.net/jfx/pull/64


More information about the openjfx-dev mailing list