[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v3]
From:       Prasanta Sadhukhan <psadhukhan () openjdk ! org>
Date:       2023-07-25 5:30:09
Message-ID: 6oMXk8NWybT3BdsoARRYXKqwYwvmsmKH8C6xfu2Qzps=.f634ce9e-6c95-4fa0-b34b-74a51b85caad () github ! com
[Download RAW message or body]

On Mon, 24 Jul 2023 17:15:18 GMT, Andy Goryachev <angorya@openjdk.org> wrote:

> > This code is still accessing shared state (`dnd`, `pWidth`, `pHeight`, \
> > `scaleFactorX`, `scaleFactorY`). Without further analysis of when and where these \
> > values are written, it is unclear whether this is the right move. In general, \
> > allowing interleaved code execution on multiple threads is very hard to get \
> > right. Better to not do it, if at all possible.
> 
> No doubt.  `dnd`, even though it's commented as "// Accessed on EDT only" (line \
> 152) seems to be accessed from FX thread via setFxEnabled line 866. I tend to agree \
> with @mstr2 that this component deserves a re-think and perhaps a re-design \
> (starting with clear separation of which methods can be accessed from which thread, \
> or adding explicit synchronization primitives). I do recall seeing a number of \
> issues with swing/fx interop in jdk8.

I have synchronized other shared resources.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1178#discussion_r1273010135


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic