RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v11]
Kevin Rushforth
kcr at openjdk.org
Fri Nov 21 13:08:18 UTC 2025
On Thu, 20 Nov 2025 12:05:37 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
>
> Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision:
>
> - Rename var w.r.t the accessing thread for easy perusal
> - comment fix
Regarding my comment:
> I do want to see a follow-up issue filed to consider redesigning the threading model, but I think this PR is a good workaround for the NPEs.
I see you filed [JDK-8372322](https://bugs.openjdk.org/browse/JDK-8372322) as a follow-up issue. Thank you.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1968#issuecomment-3562948800
More information about the openjfx-dev
mailing list