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

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8296654: [macos] Crash when launching JavaFX app with JDK that targets SDK 13
From:       Kevin Rushforth <kcr () openjdk ! org>
Date:       2022-12-22 15:26:00
Message-ID: zpl5M4RXaG56a10_UqmP9-8zeInVAvCEHnFglWeRrFc=.35ca50e7-50d1-4442-a0e8-ba253aa27b1c () github ! com
[Download RAW message or body]

On Thu, 22 Dec 2022 00:13:03 GMT, Kevin Rushforth <kcr@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


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

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