Skip to content

macOS: fix VoiceWakeOverlayController exclusivity violation (clean)#39321

Merged
steipete merged 1 commit intoopenclaw:mainfrom
fellanH:feat/39275-voicewake-fix-clean
Mar 8, 2026
Merged

macOS: fix VoiceWakeOverlayController exclusivity violation (clean)#39321
steipete merged 1 commit intoopenclaw:mainfrom
fellanH:feat/39275-voicewake-fix-clean

Conversation

@fellanH
Copy link
Copy Markdown
Contributor

@fellanH fellanH commented Mar 8, 2026

closes #39275

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 8, 2026

Greptile Summary

This PR fixes a Swift exclusive-access (memory exclusivity) violation in VoiceWakeOverlayController, TalkOverlayController, and NotifyOverlayController by replacing the inout Bool parameter on OverlayPanelFactory.present() with a pre-computed Bool value (isFirstPresent).

Root cause: Passing &self.model.isVisible as inout to a function that also captures self in an escaping/trailing closure triggered Swift's Law of Exclusivity — the same memory location had a simultaneous write (inout borrow) and a read (via self capture) at the same time.

Fix: Each call site now snapshots isFirst = !self.model.isVisible and eagerly sets self.model.isVisible = true (when needed) before entering OverlayPanelFactory.present(). The factory function now only receives a plain value copy, eliminating the exclusivity conflict entirely.

  • OverlayPanelFactory.present() signature changed from isVisible: inout BoolisFirstPresent: Bool
  • All three overlay controllers (VoiceWakeOverlayController, TalkOverlayController, NotifyOverlayController) updated to match the new signature
  • Behaviour is semantically equivalent to the original; no functional regressions expected

Confidence Score: 5/5

  • This PR is safe to merge — it fixes a Swift exclusivity violation with a minimal, well-scoped refactor and no behavioral regressions.
  • The change is mechanically straightforward: an inout Bool parameter is replaced with a pre-computed value copy across three identical call sites, and the factory function's internal logic is unchanged. All three overlay controllers remain semantically equivalent to their pre-patch behavior. The flag is set at the call site before the factory invocation, eliminating the simultaneous read/write conflict that triggered the exclusivity violation. No new logic is introduced, no tests are skipped, and the fix directly addresses the reported exclusivity crash.
  • No files require special attention.

Last reviewed commit: 992cdcc

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Mar 8, 2026

Landed via temp rebase onto main.

Thanks @fellanH!

steipete added a commit that referenced this pull request Mar 8, 2026
@steipete
Copy link
Copy Markdown
Contributor

steipete commented Mar 8, 2026

Follow-up landed on main in d5b305b

GitHub's deleted-head rebase path kept the contributor commit but dropped the maintainer follow-up that added the changelog entry and the repeated Talk overlay smoke test, so I landed those directly on main afterward.

Thanks @fellanH!

mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 8, 2026
* main: (70 commits)
  Refactor release hardening follow-ups (openclaw#39959)
  docs: clarify bot review conversation ownership (openclaw#39942)
  fix: harden talk silence timeout parsing (openclaw#39607) (thanks @danodoesdesign)
  talk: add configurable silence timeout
  transcript-policy: use named Set for anthropic signature-excluded providers
  transcript-policy: don't preserve thinking signatures for kimi-coding (openclaw#39798)
  fix: land mac universal release defaults (openclaw#33891) (thanks @cgdusek)
  Docs: clarify notarization handoff in mac release flow
  Docs: mark basic mac dist example as non-notarized
  Docs: clarify release build arch defaults for mac packaging
  macOS: default release app builds to universal binaries
  fix(issue-39839): address tool-call extra params parsing for kimi anthropic-messages
  docs: use alphabetical provider ordering
  fix: follow up openclaw#39321 and openclaw#38445 landings
  docs: note /landpr merge process
  fix: land Brave llm-context gaps (openclaw#33383) (thanks @thirumaleshp)
  feat: add Brave Search LLM Context API mode for web_search
  fix(feishu): restore @larksuiteoapi/node-sdk in root dependencies
  refactor: tighten codex inline api fallback follow-up
  macOS: set speech recognition taskHint for Talk Mode mic capture
  ...
Saitop pushed a commit to NomiciAI/openclaw that referenced this pull request Mar 8, 2026
GordonSH-oss pushed a commit to GordonSH-oss/openclaw that referenced this pull request Mar 9, 2026
hugs42 pushed a commit to hugs42/openclaw that referenced this pull request Mar 10, 2026
jenawant pushed a commit to jenawant/openclaw that referenced this pull request Mar 10, 2026
sauerdaniel pushed a commit to sauerdaniel/openclaw that referenced this pull request Mar 11, 2026
dhoman pushed a commit to dhoman/chrono-claw that referenced this pull request Mar 11, 2026
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 14, 2026
alexey-pelykh added a commit to remoteclaw/remoteclaw that referenced this pull request Mar 14, 2026
(cherry picked from commit d5b305b)

Co-authored-by: Peter Steinberger <[email protected]>
senw-developers pushed a commit to senw-developers/va-openclaw that referenced this pull request Mar 17, 2026
V-Gutierrez pushed a commit to V-Gutierrez/openclaw-vendor that referenced this pull request Mar 17, 2026
dustin-olenslager pushed a commit to dustin-olenslager/ironclaw-supreme that referenced this pull request Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: VoiceWakeOverlayController crashes with SIGABRT on macOS 26.2 (Swift exclusivity violation)

2 participants