Incorrect menu consistency warnings logged in Tahoe for NSStatusItem, performance issues related?

Is anyone else getting new warning about menu items with submenus when running on Tahoe? I'm getting big performance problems using my menu as well as seeing these messages and I'm wondering if there's a connection.

My app is faceless with a NSStatusItem with an NSMenu. Specifically it's my own subclass of NSMenu where I have a lot of code to manage the menu's dynamic behavior. This code is directly in the menu subclass instead of in a controller because the app I forked had it this way, a little wacky but I don't see it being a problem. A nib defines the contents of the menu, and it's instantiated manually with code like:

var nibObjects: NSArray? = []
guard let nib = NSNib(nibNamed: "AppMenu", bundle: nil) else { ... }
guard nib.instantiate(withOwner: owner, topLevelObjects: &nibObjects) else { ... }
guard let menu = nibObjects?.compactMap({ $0 as? Self }).first else { ... }

Within that nib.instantiate call I see a warning logged that seems new to Tahoe, before the menu's awakeFromNib is called, that says (edited):

Internal inconsistency in menus - menu <NSMenu: 0x6000034e5340> believes it has <My_StatusItem_App.AppMenu: 0x7f9570c1a440> as a supermenu, but the supermenu does not seem to have any item with that submenu

My_StatusItem_App.AppMenu: 0x7f9570c1a440 is my menu belonging to the NSStatusItem, NSMenu: 0x6000034e5340 is the submenu of one of its menu items.

At a breakpoint in the NSMenu subclass's awakeFromNib I print self and see clear evidence of the warning's incorrectness. Below is a snippet of the console including the full warning, only edited for clarity and brevity. It shows on line 32 menu item with placeholder title "prototype batch item" that indeed has that submenu.

Internal inconsistency in menus - menu <NSMenu: 0x6000034e5340>
    Title: 
    Supermenu: 0x7f9570c1a440 (My StatusItem App), autoenable: YES
    Previous menu: 0x0 (None)
    Next menu: 0x0 (None)
    Items:     (
        "<NSMenuItem: 0x6000010e4fa0 Do The Thing Again, ke mask='<none>'>",
        "<NSMenuItem: 0x6000010e5040 Customize\U2026, ke mask='<none>'>",
        "<NSMenuItem: 0x6000010e50e0, ke mask='<none>'>"
    ) believes it has <My_StatusItem_App.AppMenu: 0x7f9570c1a440>
    Title: My StatusItem App
    Supermenu: 0x0 (None), autoenable: YES
    Previous menu: 0x0 (None)
    Next menu: 0x0 (None)
    Items:     (
    ) as a supermenu, but the supermenu does not seem to have any item with that submenu
(lldb) po self
<My_StatusItem_App.AppMenu: 0x7f9570c1a440>
    Title: My StatusItem App
    Supermenu: 0x0 (None), autoenable: YES
    Previous menu: 0x0 (None)
    Next menu: 0x0 (None)
    Items:     (
        "<NSMenuItem: 0x6000010fd7c0 About My StatusItem App\U2026, ke mask='<none>', action: showAbout:, action image: info.circle>",
        "<NSMenuItem: 0x6000010fd860 Show Onboarding Window\U2026, ke mask='Shift', action: showIntro:>",
        "<NSMenuItem: 0x6000010fd900 Update Available\U2026, ke mask='<none>', action: installUpdate:, standard image: icloud.and.arrow.down, hidden>",
        "<NSMenuItem: 0x6000010e46e0, ke mask='<none>'>",
        "<NSMenuItem: 0x6000010e4780 Start The Thing, ke mask='<none>', action: startTheThing:>",
        "<NSMenuItem: 0x6000010e4dc0 \U2318-\U232b key detector item, ke mask='<none>', view: <My_StatusItem_App.KeyDetectorView: 0x7f9570c1a010>>",
        "<NSMenuItem: 0x6000010e4e60, ke mask='<none>'>",
        "<NSMenuItem: 0x6000010e4f00 saved batches heading item, ke mask='<none>', view: <NSView: 0x7f9570b4be10>, hidden>",
        "<My_StatusItem_App.BatchMenuItem: 0x6000016e02c0 prototype batch item, ke mask='<none>', action: replaySavedBatch:, submenu: 0x6000034e5340 ()>",
        "<NSMenuItem: 0x6000010f7d40, ke mask='<none>'>",
        "<My_StatusItem_App.ClipMenuItem: 0x7f956ef14fd0 prototype copy clip item, ke mask='<none>', action: copyClip:>",
        "<NSMenuItem: 0x6000010fa620 Settings\U2026, ke='Command-,', action: showSettings:>",
        "<NSMenuItem: 0x6000010fa6c0, ke mask='<none>'>",
        "<NSMenuItem: 0x6000010fa760 Quit My StatusItem App, ke='Command-Q', action: quit:>"
    )

Is this seemingly incorrect inconsistency message harmless? Am I only grasping at straws to think it has some connection to the performance issues with this menu?

Hello @jpmhouston , if your menu item is working normally, you can regard the logs as log noise. Please see On Log Noise for more information.

(damn, i had notifications off and didn't see this response for a week 😩)

.

if your menu item is working normally...

It's not. Paraphrasing the first paragraph of my question: I'm wondering if there's a connection between these new log messages and the performance problems I'm seeing using my menu on Tahoe. And it's not lag involving the menu item mentioned in the log, its the whole menu.

I was grasping at straws with this log message connection. But also I wanted to ask here before filing a bug report about the seemingly incorrect messages, which I'll do If they're still occurring with 26.1.


I'll mention more about the lag and beach balls, even though I might be making a new post about it. I haven't seen anything like this in other menus in other normal or menubar applications. The issue is new in Tahoe, and I'm running an i9 Intel (trying to get confirmation today about the same thing occurring on Apple Silicon).

The lag is when selecting any of the menu's static menu items defined in my .nib file. Mousing down the menu over menu items there's a delay before the highlight draws, or to select an item, also just when clicking elsewhere to close the menu.

So it's not just the specific menu item mentioned in the log messages or its submenu. In fact I'm removing those from the menu later in awakeFromNib right after the logging occurs.

My app uses that removed and retained menu item as a prototype, potentially copying the object and adding copies to the menu later. This seems to work to dynamically add instances of the parent menu item each with its submenu. I'm seeing the lag without having added any such dynamic items.

On previous OS versions I only had more-minor lag issues setting the menu state prior to opening it. I optimized this by pre-flighting item addition and removal so I only changed menu item visibility prior to opening. This hasn't changed on Tahoe and I see no new lag when opening the menu.

I'm still looking for a clue in my saved Instruments runs, and constructing a simplified version of my app to investigate the problem. I'll post another thread if I spot something, and/or file an individual bug report about it.

I also have this problem in my AppKit Mac app that that has LSUIElement set to true in its Info.plist and displays an NSStatusItem (i.e., a menu bar icon) as its main interface.

My app also has a default Main Menu in its Main.storyboard file because it has a setting to decide if the app should show a Dock icon and menu bar or not (honored by callingNSApp.setActivationPolicy(…) at runtime).

I get these warnings about the default menus in the main menu bar when my app launches. For example, here's a warning about the default Services submenu in the main application menu for my app, SwitchGlass:

2025-11-11 07:55:35.456092-0500 0x384414   Error       0x0                  4445   0    SwitchGlass: (AppKit) [com.apple.AppKit:Menu] Internal inconsistency in menus - menu <NSMenu: 0xc81288a00>
    Title: Services
    Supermenu: 0xc812889c0 (SwitchGlass), autoenable: YES
    Previous menu: 0x0 (None)
    Next menu: 0x0 (None)
    Items:     (
    ) believes it has <NSMenu: 0xc812889c0>
    Title: SwitchGlass
    Supermenu: 0x0 (None), autoenable: YES
    Previous menu: 0x0 (None)
    Next menu: 0x0 (None)
    Items:     (
    ) as a supermenu, but the supermenu does not seem to have any item with that submenu

These warnings don't seem to affect functionality (yet?), but I'd love a way to silence them.

Things I've tried: setting NSApp.mainMenu = nil in applicationWillFinishLaunching(…) or awakeFromNib() in my app delegate. The warnings appear in the console even before my app delegate's overridden awakeFromNib() is called!

Incorrect menu consistency warnings logged in Tahoe for NSStatusItem, performance issues related?
 
 
Q