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

macos14: macOS14 SDK and -Dapple.laf.useScreenMenuBar=true cause crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: External
    • Icon: P4 P4
    • tbd
    • 17, 21, 22
    • client-libs

      I created build of JDK 22 (but this is not specific to JDK 22) on macOS 14.1 on an M1 macMini using Xcode 15.0.1 (ie the macOS 14 SDK)

      This builds just fine and runs SwingSet2 just fine .. unless on the command line you set -Dapple.laf.useScreenMenuBar=true

      In that case I get a very terse message
      "Trace/BPT trap: 5 (core dumped)
      This happens after the splash screen but before any Java window appears.

      On the same system, using the same JDK 22 source I built using Xcode 14.3.1 (ie macOS 13 SDK). In that case there is NO crash.

      So this seems to be triggered by using macOS 14 SDK (ie Xcode 15) for the build.

      This was first reported in an email thread
      https://mail.openjdk.org/pipermail/build-dev/2023-November/041756.html

      There there are references to other people seeing it in conjunction with a message along the lines of
      "References to Carbon menus are disallowed with AppKit menu system (see rdar://101002625). Use instances of NSMenu and NSMenuItem directly instead."

      I see no such message, just the terse crash message I posted above.

      There is a suggestion that this is an Apple bug, not a JDK bug.
      But either way, we should have a JBS issue to track it.






            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: