Skip to content

Fix systray crash on macOS due to dual NSApplication run loops#12

Merged
ehsaniara merged 2 commits into
mainfrom
systray-crashes-on-macos
Apr 10, 2026
Merged

Fix systray crash on macOS due to dual NSApplication run loops#12
ehsaniara merged 2 commits into
mainfrom
systray-crashes-on-macos

Conversation

@ehsaniara
Copy link
Copy Markdown
Owner

Summary

Fixes #11 — Egressor crashes with SIGTRAP: trace trap on macOS when the system tray runs alongside the Wails desktop UI.

  • Replace systray.Run() with systray.Register() so the tray hooks into the existing Wails run loop instead of starting a competing NSApplication loop
  • Remove the unnecessary go goroutine wrapper in App.Startup since Register is non-blocking
  • Fix Policy tab layout to be fully resizable by removing the max-w-2xl constraint

Root Cause

systray.Run() starts its own NSApplication event loop, but Wails already owns the main thread. macOS requires all UI work on a single main thread — two competing run loops cause a fatal SIGTRAP
signal.

@ehsaniara ehsaniara self-assigned this Apr 10, 2026
@ehsaniara ehsaniara linked an issue Apr 10, 2026 that may be closed by this pull request
@ehsaniara ehsaniara merged commit 29171e3 into main Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

systray crashes on macOS due to dual NSApplication run loops

1 participant