You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StableBar crashes reading the menu bar items when macOS lists an app's PID twice #616
Not reproduced on demand. The crash happened while an app (Dayflow) relaunched itself after it was granted Screen Recording access, which likely made NSWorkspace.shared.runningApplications list the same process identifier twice for a moment. The crash report doesn't say which PID was duplicated, so this trigger is likely but not proven.
Expected
StableBar keeps running and reads the menu bar items, using one app per process identifier.
Sources/StableBar/AppMenu.swift:233 on main maps the running apps by process identifier with Dictionary(uniqueKeysWithValues:), which traps on a duplicate key:
Keeping the first app for each process identifier (Dictionary(_:uniquingKeysWith:)) avoids the trap. NativeMetrics.swift builds its CPU-time map by process identifier the same way, and the process list already does this for the running apps a few lines below.
Related
None found: searched open and closed issues and pull requests for crash, duplicate PID, runningApplications, readMenuBarItems and uniqueKeysWithValues. #446 changed which app owns the menu bar items, not this map.
Activity
stablebar-releases commentedon Nov 14, 2026
🎉 This issue has been resolved in version 0.15.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀