On Thu, 22 Dec 2022 00:13:03 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

> Apple has changed the behavior for applications that are built using the 
> macOS SDK 13 (which is what XCode 14 uses), such that passing in a null 
> tracking rect to `NSView::removeTrackingRect` will cause now cause a crash. 
> This has exposed a latent bug in the JavaFX macOS glass code that removes the 
> previous tracking rect even if it is null in `setFrame`, `setFrameSize`,  and 
> `updateTrackingAreas`.
> 
> The fix is to check that the current tracking rect is non null before calling 
> `removeTrackingRect` as suggested in both this bug report and duplicate bug 
> [JDK-8297131](https://bugs.openjdk.org/browse/JDK-8297131). The latter bug 
> report describes an easy way to reproduce this without building your own JDK, 
> by making a copy of the JDK and modifying the meta-data that indicates the 
> target version of the macOS SDK. I did that, and can reproduce this crash 
> with any JavaFX program without this fix, and verified that it works 
> correctly with this fix.
> 
> NOTE: it is the version of the SDK (Xcode) that the JDK is targeted to that 
> matters. It is irrelevant what version of the SDK (i.e., what Xcode) is used 
> to build JavaFX. This make this a more serious bug than it otherwise would be.

Thanks for the additional reviews. Btw, I was able to reproduce the crash on a 
Mac x64 system running Ventura, and this fixes it there as well.

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

PR: https://git.openjdk.org/jfx/pull/981

Reply via email to