Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266743

Crash on macOS 10.11 due to ignored @available 10.12 check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: openjfx17
    • Fix Version/s: openjfx17
    • Component/s: javafx
    • Labels:

      Description

      Since https://bugs.openjdk.java.net/browse/JDK-8265031 the minimum mac-os version for JavaFX is increased to 10.12. We pass that minimum version to the compiler.

      With https://bugs.openjdk.java.net/browse/JDK-8263169 a test is added to check if we are at MacOS 10.12 or above, and if so some code is executed that was not available before 10.12:

       if (@available(macOS 10.12, *)) {...}

      The combination of these 2 patches lead to a crash on 10.11 for any JavaFX application. The compiler seems to ignore the `@available` check if we already pass 10.12 as the minimum version, hence the code that wasn't available on 10.11 is tried to be executed.

      There are a number of other ways to check if we're at 10.12 at runtime, which would prevent this crash.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kcr Kevin Rushforth
              Reporter:
              jvos Johan Vos
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: