bunch icon indicating copy to clipboard operation
bunch copied to clipboard

Bunch crashes on launch on macOS 27 when setting the status menu off the main thread

Open mbbischoff opened this issue 3 months ago • 14 comments

Environment

  • macOS 27.0 (26A5388g), Apple silicon
  • Bunch 1.4.17 (180)
  • Bunch Beta 1.4.18 (182)

Reproduction

  1. Launch Bunch from /Applications.
  2. Bunch terminates before its menu-bar item becomes usable.

This reproduces on every launch with both the stable and beta builds. The stable build exits about 0.18 seconds after process launch.

Expected behavior

Bunch finishes launching and displays its menu-bar item.

Actual behavior

Bunch traps while assigning the status menu from a background queue:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Termination:     SIGNAL 5, Trace/BPT trap: 5
Crashed Thread:  com.apple.root.background-qos

0   BoardServices      -[BSServiceMainRunLoopQueue assertBarrierOnQueue] + 316
1   FrontBoardServices -[FBSScene _updateClientSettings:] + 64
2   FrontBoardServices -[FBSScene updateClientSettingsWithBlock:] + 132
3   AppKit             -[NSSceneStatusItem _updateSupportsExpandedInterfaceSession] + 64
4   AppKit             -[NSStatusBarButtonCell setStatusMenu:] + 60
5   AppKit             -[NSStatusBarButton setStatusMenu:] + 60
6   AppKit             -[NSStatusItem setMenu:] + 116
7   Bunch              Bunch + 445124
8   libdispatch        _dispatch_call_block_and_release + 32
9   libdispatch        _dispatch_client_callout + 16
10  libdispatch        _dispatch_root_queue_drain + 708

The beta build has the same stack, with its Bunch frame at image offset 445612.

Diagnosis

The shipped binary's Objective-C metadata maps the stable-build Bunch frame to -[AppDelegate generateStatusMenu]:

-[AppDelegate generateStatusMenu]  0x10006c870
next method                        0x10006cb4c
crashing return address            0x10006cac4

Disassembly shows that address is immediately after the call that assigns the generated menu to the status item. On macOS 27, AppKit routes this through scene-backed status-item state and asserts because the mutation arrived on com.apple.root.background-qos, not the main run-loop queue.

Suggested fix

Ensure generateStatusMenu—including creation and mutation of NSMenu, NSMenuItem, and NSStatusItem—always executes on the main queue.

mbbischoff avatar Aug 06 '26 13:08 mbbischoff

Still reproduces on macOS 27.0 (26A5406e) with Bunch Beta 1.4.18 (182), Apple silicon (Mac17,6). Two crashes today at 11:54:36 and 11:54:40 local, both with the identical stack — generateStatusMenu reaching -[NSStatusItem setMenu:] on com.apple.root.background-qos, trapping in -[BSServiceMainRunLoopQueue assertBarrierOnQueue].

It dies before first-run setup: the prefs domain only ever contains SUHasLaunchedBefore and launchAtLogin, so the Bunches folder is never picked. 182 is also the newest build in the beta appcast, so there's nothing to update into — no workaround from the user side.

lulzpid avatar Aug 15 '26 19:08 lulzpid

Same issues here.

kevinapp avatar Sep 02 '26 16:09 kevinapp

Still reproduces on macOS 27.0 (26A5425a), Apple silicon, with both builds:

  • Bunch 1.4.17 (180) — crashed 2026-09-04 17:15:52 local
  • Bunch Beta 1.4.18 (182) — crashed 2026-09-04 17:09:32 local

Identical stack to the original report: -[NSStatusItem setMenu:] called from a libdispatch worker thread, trapping in -[BSServiceMainRunLoopQueue assertBarrierOnQueue]. Dies before the menu bar item appears. Confirmed 180 and 182 are still the newest entries in both appcasts as of today.

razielpanic avatar Sep 04 '26 21:09 razielpanic

Same issue here too,

TarjinderSingh avatar Sep 05 '26 01:09 TarjinderSingh

I have the same issue. Just tired the Bunch Beta v1.4.18 (β182). Can I run Bunch without using the menu bar item?

richardhmx avatar Sep 11 '26 15:09 richardhmx

I'll get a new release out soon. If I open sourced the app, do you think anyone would be willing to help maintain it?

ttscoff avatar Sep 11 '26 15:09 ttscoff

I'll get a new release out soon. If I open sourced the app, do you think anyone would be willing to help maintain it?

Yeah, I'd pitch in here.

mbbischoff avatar Sep 11 '26 19:09 mbbischoff

1.4.19 should fix this https://bunchapp.co/download/ (beta download). Tested on a 27 VM and launches fine now.

ttscoff avatar Sep 12 '26 18:09 ttscoff

I can confirm that the new build launches, however none of my bunches appear in the menu. I can still launch them from raycast though using the Bunch extension.

Image

andrewgribben avatar Sep 14 '26 08:09 andrewgribben

OK, I think I have that fixed, but I also realized that I forgot to symlink the autoupdater on my new Mac and the last beta release can't auto update itself, so you'll have to download again from https://bunchapp.co/download/.

Direct link: https://cdn3.brettterpstra.com/updates/bunch-beta/BunchBeta1.4.19186.dmg

ttscoff avatar Sep 14 '26 12:09 ttscoff

In the new version the menu won't open at all, sorry!

andrewgribben avatar Sep 14 '26 15:09 andrewgribben

Try with build 187. I tested on 26 and in a VM for 27 and it seems to work fine.

ttscoff avatar Sep 14 '26 16:09 ttscoff

Try with build 187. I tested on 26 and in a VM for 27 and it seems to work fine.

187 is working for me.

Thank you!

kevinapp avatar Sep 14 '26 18:09 kevinapp

Awesome. Going to make a release on the main channel with an announcement.

ttscoff avatar Sep 14 '26 18:09 ttscoff