Repository navigation
Closed
Description
What happens
StableBar quits with EXC_BREAKPOINT (Trace/BPT trap: 5) on the main thread when a widget's tooltip or hover controls open after the hover delay. It happened twice:
- 0.14.0-beta (922): right after finishing Edit Bar in Place, through the hover controls of a battery widget with a
hoverLayout. - 0.14.0-beta (932): through a widget's plain tooltip. What preceded this one isn't known.
0 StableBar specialized WidgetPopup.openTooltip<A>(id:style:defaults:store:anchor:maxWidth:alignment:ignoresMouseEvents:content:) + 4020
2 StableBar closure #3 in WidgetView.hoverChanged(_:tooltip:output:) + 572
4 StableBar closure #1 in WidgetPopup.hover(_:store:anchor:show:) + 1
8 libswift_Concurrency.dylib completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1
Steps to reproduce
Worked out from the code, not reproduced in the app:
- Have a widget with hover controls (
hoverLayout) or a tooltip. - Choose Edit Bar in Place.
- Finish editing and move the pointer over that widget's tile while the edit bar fades out.
- After the hover delay, StableBar quits.
Expected
No crash, and nothing opens for a widget that is no longer on screen.
Environment
- StableBar 0.14.0-beta (922 and 932)
- macOS 27.2.1 (26B131), Mac15,6
Evidence
- In both builds, the disassembly shows the trap right after
-[NSView window]returns nil (cbz x0tobrk #1):anchor.window!failed. - A test that hovers an anchor in no window stops with
WidgetPopup.swift:440: Fatal error: Unexpectedly found nil while unwrapping an Optional value.
Diagnosis
On main (09f1ab1):
WidgetPopup.openTooltipstarts withlet window = anchor.window!(Sources/StableBar/WidgetPopup.swift:440), andopendoes the same (:505).- The hover task in
WidgetPopup.hover(WidgetPopup.swift:320-329) checks for cancellation andbarEditing.allowsWidgetActionsafter its delay, but not that the anchor is still in a window. - While the bar is edited in place, its tiles draw real
WidgetViews (Sources/StableBar/BarEditView.swift:365). A widget'sPopupAnchoronly joins the view hierarchy when widget actions are allowed (Sources/StableBar/BarView.swift:702), so a tile's anchor is never in a window, andremoveAnchor, which cancels a pending hover, never runs for it. - When editing ends, the edit bar fades out (
BarView.swift:59-61), andhoverChangedreadsallowsWidgetActionswhen the hover arrives. A tile hovered during the fade then schedules a hover with an anchor in no window. This step is inferred from the code.
Skipping the hover when anchor.window is nil covers popups, tooltips, hover controls and rows, which all unwrap it.
Related
- A cancelled hover can still show a tooltip or close its popup when the Mac is busy #482 / fix: keep a cancelled hover from showing a tooltip or closing its popup late #483: a cancelled hover showing late. Same hover task, different cause.
- Submenus in a widget's right-click menu blink while editing the bar in place #582 / fix: keep a widget's submenus open while editing the bar in place #583: edit-tile redraws closing context submenus. They touch the tiles, not hovers.
Triaged by Claude Code (Claude Opus 5.5).
Activity
stablebar-releases commentedon Nov 12, 2026
🎉 This issue has been resolved in version 0.14.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀