JDK-8269967 : JavaFX should fail fast on macOS below minimum version
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: openjfx17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2021-07-06
  • Updated: 2021-07-20
  • Resolved: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx18Fixed
Related Reports
Blocks :  
Relates :  
Description
This is a follow-on fix to JDK-8266743.

The JavaFX build specifies the minimum version of macOS on which it will run. This allows using APIs from that minimum version without checking for their availability at runtime.

If there are any `@available` checks in the code less than or equal to that minimum, the clang compiler will elide these checks so that no checking is done at runtime. This would be fine if macOS failed to load a binary that targets a newer library, but in the case of dylibs, it loads it, which then leads to a runtime crash. This sort of accidental, deferred failure leads to a bad experience, and was the cause of JDK-8266743. Given where we were in the JavaFX release, we decided to revert the change to the minimum version back to 10.10.

Regardless of what the minimum version is, we should add a check to the platform initialization code to verify that version and "fail fast" on an attempt to run on any older version. Otherwise, we will continue to have the possibility of a similar crash on an older version of macOS.

Separately, we plan to bump the minimum version to 10.12 again for JavaFX 18 -- see JDK-8269968.
Comments
Changeset: 00b353e8 Author: Kevin Rushforth <kcr@openjdk.org> Date: 2021-07-13 11:53:16 +0000 URL: https://git.openjdk.java.net/jfx/commit/00b353e8f0afbe2b024b15463df867c6647d34be
13-07-2021