Repository navigation
Description
What happened
On macOS, every SnapShot taken while Microsoft Outlook is the frontmost window makes macOS show "T3 Code (Beta) quit unexpectedly". The main app keeps running, and the screenshot still reaches the thread, but Outlook's window text is missing. SnapShots of other apps work and include their accessibility text.
Diagnosis
The crashing process is the SnapShot accessibility helper (SnapShotAccessibilityWorker, forked by makeSnapShotAccessibilityProcessPool in apps/desktop/src/snapShot/DesktopSnapShot.ts). It runs from the main app binary, so macOS names the crash after the app.
The crash is a stack overflow in a libuv threadpool thread inside @crowecawcaw/xa11y 0.15.4 while it walks Outlook's accessibility tree:
EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE, "Could not determine thread index for stack guard region", Bus error 10- Crashing thread:
libuv-worker, started fromnode::ThreadPoolWork::ScheduleWork xa11y.darwin-arm64.noderecurses through the same frame (offset0xdfc0c) intoHIServices AXUIElementCopyMultipleAttributeValues→CFStringCreateWithFormat, and the overflow happens there
Outlook's accessibility tree seems to be deep enough to exhaust the libuv worker thread's stack during xa11y's recursive traversal. The helper's isolation works: the capture completes without accessibility context. The user still gets a system crash dialog on every SnapShot of Outlook.
main still pins xa11y 0.15.4, and no SnapShot change since v0.1.11 touches this path, so this is probably not fixed on nightly either.
Possible directions: bound the traversal depth or node count on macOS, run the xa11y read on a thread with a larger stack, or report the deep recursion to xa11y upstream.
Steps to reproduce
- On macOS, open Microsoft Outlook and make it the frontmost window, with a message open.
- Press the SnapShot shortcut (here: both Shift keys).
- The screenshot arrives in T3 Code, and a few seconds later macOS shows "T3 Code (Beta) quit unexpectedly".
The user reports it happens every time with Outlook and not with the other apps they've tried.
Version
T3 Code Desktop 0.1.11 (stable), where the bug happened. The triage CLI and local server are also 0.1.11.
Environment
- macOS 27.2.1 (26B131), Apple silicon (darwin arm64)
- T3 Code (Beta) desktop app, local server running inside the desktop app
- Surface: desktop app, SnapShot global shortcut
Evidence
Four crash reports today (13:14, 13:15, 21:05, 21:06 local), all with the same crashing-thread stack:
Exception: EXC_BAD_ACCESS (SIGILL), KERN_PROTECTION_FAILURE
"Could not determine thread index for stack guard region"
Termination: Bus error: 10
Thread: libuv-worker (crashed)
Electron Framework v8::internal::ThreadIsolation::JitPageReference::AllocationContaining (symbolication approximate)
Electron Framework v8::internal::compiler::CompilationDependencies::PrepareInstall (symbolication approximate)
CoreFoundation __CFStrAllocateMutableContents
CoreFoundation __CFStringChangeSizeMultiple
CoreFoundation __CFStringAppendBytes
CoreFoundation __CFStringAppendFormatCore
CoreFoundation CFStringCreateWithFormat
HIServices AXUIElementCopyMultipleAttributeValues
xa11y.darwin-arm64.node +0x164150
xa11y.darwin-arm64.node +0x135264
xa11y.darwin-arm64.node +0x134d5c
xa11y.darwin-arm64.node +0x15a458
xa11y.darwin-arm64.node +0x13f8c0
xa11y.darwin-arm64.node +0xdfae0
xa11y.darwin-arm64.node +0xdfc0c (x6, recursion)
xa11y.darwin-arm64.node +0x9eb8
Electron Framework node::ThreadPoolWork::ScheduleWork()::lambda(uv_work_s*)
libsystem_pthread _pthread_start
The desktop trace for the 21:05 capture shows the capture succeeding while the helper crashed:
20:05:53.797Z desktop.snapShot.shortcutActivated 3262 ms Success
20:05:53.797Z desktop.snapShot.capture 3262 ms Success
20:05:54.255Z desktop.snapShot.persistCapture 2803 ms Success
20:05:57.059Z dispatchSnapShotEvent "ready"
(crash report written 20:05:59Z)
A screenshot of the macOS crash dialog will be attached.
Related issues
- [Bug]: T3 Code (Nightly) quit unexpectedly (repeatedly, like 10 times over an hour or so) #22247 (closed): similar symptom, a "quit unexpectedly" dialog while the app keeps working; the cause there is not confirmed to be the same
- [Bug]: SnapShots never include app text for Flatpak and GTK4 apps on Linux #12597 (closed): SnapShot accessibility text on Linux, same xa11y code path, different platform
Fix applied or workaround
None applied. The only workaround is to avoid SnapShot while Outlook is frontmost. There is no setting to turn off accessibility text for SnapShots.
Filed by
Diagnosed and written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via the T3 Code triage playbook.
Activity