Skip to content

Fix macOS collector Tk crash and clarify Apple silicon setup#2

Open
ZhiyuanMa2017 wants to merge 1 commit intoZdong104:mainfrom
ZhiyuanMa2017:main
Open

Fix macOS collector Tk crash and clarify Apple silicon setup#2
ZhiyuanMa2017 wants to merge 1 commit intoZdong104:mainfrom
ZhiyuanMa2017:main

Conversation

@ZhiyuanMa2017
Copy link
Copy Markdown

Summary

This PR improves the macOS collector flow in two ways:

  1. Fixes the macOS startup crash caused by Tk/AppKit window creation on a background thread.
  2. Clarifies the macOS setup instructions for Homebrew Python on Apple silicon, where tkinter may be missing unless the matching Tk package is installed.

What Changed

Code

  • Disable the Tk overlay path on macOS.
  • Fall back to terminal input for task descriptions on macOS.
  • Skip the Tk screen-selection dialog on macOS.

Docs

  • Update the macOS README section to explain that users need a Python installation with Tk support.
  • Add a Homebrew example:
    • brew install python-tk@3.14

Why

On macOS, the collector was crashing at startup with:

NSWindow should only be instantiated on the main thread!

This came from the Tk overlay and dialog flow being created from a background thread.

Before that, on Homebrew Python 3.14, tkinter was also missing until the matching Tk package was installed:

ModuleNotFoundError: No module named '_tkinter'

Result

  • The collector can now start on macOS without the Tk/AppKit crash.
  • macOS users have clearer setup instructions when using Homebrew Python on Apple silicon.

Notes

  • macOS users still need to grant:
    • Screen Recording
    • Accessibility

to the terminal app they use to launch the collector.


Better test this change on windows and linux before merge.

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.

1 participant