Skip to content

fix(desktop): bump tao to 0.37.2 to stop AppKit exceptions aborting Buzz - #1885

Merged
matt2e merged 1 commit into
mainfrom
just-dev-crashed
Oct 29, 2026
Merged

matt2e merged 1 commit into
mainfrom
just-dev-crashed

Conversation

@matt2e

@matt2e matt2e commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Buzz desktop aborted (SIGABRT) on macOS 27 after an AppKit assertion in the Writing Tools text-selection button. This PR bumps tao from 0.37.1 to 0.37.2, which includes the upstream fix (tauri-apps/tao#1354). AppKit can then handle its own exception, and the app keeps running.

The crash

  • Trigger: during a long just desktop session, a key press while text was selected in the webview brought up AppKit's Writing Tools button.
  • What AppKit did: it tore the button down on a mouse-entered event and hit an internal assertion: NSInternalInconsistencyException at NSCampoLightweightUIController.m:1429.
  • Result: the process died 6 ms later on the main thread with abort() called. Rust printed no panic message.

Root cause

  • Where it was raised: the exception was raised inside [super sendEvent:].
  • Why it couldn't unwind: tao 0.37.1 overrides -[NSApplication sendEvent:] with an extern "C" Rust function, and a foreign exception can't unwind through one. Rust's landing pad in tao::…::app::send_event called panic_cannot_unwind and then aborted.
  • What a native app would do: -[NSApplication run] would have caught the exception, logged it and kept running.
  • Not Buzz code:
    • The abort frame sits directly under -[NSApplication _handleEvent:], above every Buzz handler.
    • tao's stop_app_on_panic already catches panics from Buzz's handlers and re-raises them as ordinary panics.

Fix

tao 0.37.2 declares its ObjC method implementations and CFRunLoop callbacks extern "C-unwind". AppKit's exceptions then reach NSApplication's handler, which reports them and continues. The upstream PR describes the same assertion on macOS 27.0.

The release also includes:

Keep in mind: the fix only holds without panic = "abort". Buzz doesn't set it in any profile, so keep it that way.

Scope

  • Lockfile-only: Cargo.lock changes tao's version and checksum, and nothing else moves.
  • Why no manifest edit: tauri-runtime-wry 2.12.2 already depends on tao = "0.37.0", so no manifest changes are needed.
  • Hand-written diff: cargo update -p tao --precise 0.37.2 also rewrote 15 unrelated windows-sys/windows-core dependency edges to other versions that are already locked. I left those out. cargo check --locked accepts the tao-only lockfile as is.

Test plan

  • bin/cargo check --locked -p Buzz: compiles, and cargo tree -i tao resolves to tao v0.37.2.
  • Rebuild and run just desktop. Select text in a message to bring up the Writing Tools button, use it and dismiss it, and confirm normal use (typing, selection, window drag, drag and drop) still works.
  • Not reproducible on demand: the AppKit assertion can't be triggered at will, so this checklist can't prove the abort is gone. Direct evidence would need fix(buzz-mcp): filter, attribute and page read results #1354's swizzle repro (raising an NSException under -[NSApplication sendEvent:]) in a scratch build. Otherwise, the next time the assertion fires, it should show in the unified log while Buzz keeps running.

🤖 Generated with Claude Code

On macOS 27, AppKit's Writing Tools text-selection affordance can raise
an NSInternalInconsistencyException (NSCampoLightweightUIController.m:1429)
inside [super sendEvent:]. tao 0.37.1 overrides -[NSApplication sendEvent:]
with an `extern "C"` function, so the foreign exception could not unwind
through it: Rust called panic_cannot_unwind and aborted the app. A native
app would have let -[NSApplication run] log the exception and continue.

tao 0.37.2 (tauri-apps/tao#1354) declares its ObjC method implementations
and CFRunLoop callbacks `extern "C-unwind"`, so AppKit's own handler
reports the exception and the app keeps running. The fix depends on Buzz
not setting `panic = "abort"`, which it does not.

The release also fixes a macOS abort on drags without file paths (#1267),
a debug-build panic in drag_window with no current event (#1372), and
memory growth when creating and closing windows on macOS (#1368).

Lockfile-only: tauri-runtime-wry already accepts tao 0.37.x, and only
tao's version and checksum change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e marked this pull request as ready for review October 29, 2026 05:13
@matt2e
matt2e requested a review from a team as a code owner October 29, 2026 05:13

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez.

@matt2e
matt2e merged commit 11dd17b into main Oct 29, 2026
36 checks passed
@matt2e
matt2e deleted the just-dev-crashed branch October 29, 2026 06:26
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.

2 participants