RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer

Kevin Rushforth kcr at openjdk.org
Mon Nov 10 20:45:34 UTC 2025


On Mon, 10 Nov 2025 10:37:25 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> NPE is seen while accessing transient "scenePeer" variable between reads..
> Fix is made to store it in a temp variable rather than reading it twice since the value can change between successive reads in many places it is accessed.
> Also some debug logs added to be enabled via `jfxpanel.debug` property

@prsadhuk Can you provide your evaluation as to why this is the right fix in light of the comments on the earlier PR #1178 and the discussion in JBS issue [JDK-8255248](https://bugs.openjdk.org/browse/JDK-8255248)?

Reviewers: @kevinrushforth @andy-goryachev-oracle 

Also, @mstr2 and @hjohn might want to weigh in since they had comments on #1178

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

PR Comment: https://git.openjdk.org/jfx/pull/1968#issuecomment-3513820947


More information about the openjfx-dev mailing list