On Tue, 4 Nov 2025 17:30:43 GMT, Andy Goryachev <[email protected]> wrote:

>> seems like being set in the EDT always
>
> BUT, in line 555 we are accessing lwFrame from the FX app thread, in a 
> completely unsafe manner - test followed by use.

Good catch. Other than being another possible source of an NPE, that one seems 
unrelated, so might be better handled as a follow-up. This one isn't a 
threading issue whereas the one you pointed out is.

@prsadhuk Can you at least take a look at it and see whether there is any 
relation to the bug you are fixing? If not, let's file a follow-up bug. The fix 
is to also check for null on the EDT before calling createUngrabEvent (as is 
done in disposeLwFrame -- even if you test lwFrame for null in the FX thread 
(to short-circuit creating the call on the EDT), you still need to check before 
use once you actually are on the EDT.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1960#discussion_r2491576342

Reply via email to