Vivaldi (Chromium-based browsers) freeze on macOS 26 Tahoe due to IMKInputSession deadlock triggered by input source switching
还没有人认领这个 Issue。
评估
调研方向
Start from where Input Source Pro calls TISSelectInputSource when an app gains focus (the focus-observation/switching code in the Swift app), since that call is what triggers IMKInputSession activate inside Vivaldi. Investigate whether the switch can be deferred, throttled, or performed off the target app's activation path so Chromium's firstRectForCharacterRange query cannot race it. Done means a documented mitigation that avoids the XPC deadlock on macOS Tahoe, verifiable by reproducing the Cmd+T navigation freeze with the fix applied. The issue has no comments, no linked PR, and is 194 days old, so confirm maintainers still want it handled before investing.
由索引模型根据 Issue 内容生成。
描述
Steps to Reproduce
- Have Input Source Pro configured to automatically switch input source when focusing Vivaldi (e.g., switch to Chinese input when Vivaldi becomes active)
- Open Vivaldi
- Open a new tab (Cmd+T)
- Type a URL in the address bar (e.g.,
claude.aiorgoogle.com) and press Enter - Observe the browser becoming completely unresponsive for 15–30 seconds before recovering
The freeze is reliably reproducible on new tab navigation and hit-or-miss on subsequent navigations within the same tab.
Expected Behavior
Input Source Pro switches the input method when Vivaldi gains focus without causing any freeze or unresponsiveness in the browser.
Actual Behavior
Vivaldi's main thread deadlocks for 15–30 seconds. The browser is completely unresponsive — no scrolling, clicking, or typing possible. It eventually recovers on its own. Quitting Input Source Pro completely eliminates the freeze.
A spindump captured during the freeze shows Vivaldi's main thread (CrBrowserMain) blocked in IMKInputSession_Modern activate → invocationAwaitXPCReply → HIRunLoopSemaphore wait → psynch_cvwait, while simultaneously Chromium's text input bridge is blocked in firstRectForCharacterRange → psynch_cvwait — a classic XPC deadlock between the IME activation triggered by Input Source Pro and Chromium's concurrent cursor position query.
Relevant portion of spindump stack trace:
Thread 0x4b4df7 DispatchQueue "com.apple.main-thread" CrBrowserMain 1934 samples
-[NSTextInputContext handleTSMEvent:completionHandler:]
→ TUIRectForCharacterRange
→ -[NSTextInputContext firstRectForCharacterRange:completionHandler:]
→ ChromeMain → psynch_cvwait ← BLOCKED
CallMyActivateTSMDocument
→ IMKInputSession_Modern activate
→ IMKInputSessionXPCInvocation_Modern invocationAwaitXPCReply
→ HIRunLoopSemaphore wait
→ __CONSIDER_WHO_REQUESTED_THIS_WAIT_BEFORE_SENDING_BUG_TO_HISERVICES__
→ psynch_cvwait ← BLOCKED
Both call chains are blocked simultaneously waiting on each other, causing a full deadlock.
After quitting Input Source Pro and capturing a second spindump under identical conditions, the main thread shows a completely healthy idle state (mach_msg2_trap in normal event loop wait) with no IMKInputSession activity and no freeze.
Environment
| Field | Value |
|---|---|
| Input Source Pro Version | 2.9.0 (605) |
| macOS Version | macOS 26.3.1 (Build 25D771280a) — Tahoe beta |
| Affected Application | Vivaldi 7.9.3970.45 (Chromium-based). Likely affects all Chromium-based browsers (Chrome, Edge, Arc, etc.) as the root cause is in Chromium's NSTextInputContext bridge, not Vivaldi specifically |
| Relevant Input Sources | U.S. English + Chinese Simplified (Pinyin) — Input Source Pro configured to switch to Chinese when Vivaldi is focused |
Additional Context
The root cause appears to be a race condition introduced or worsened in macOS Tahoe's TextInputUIMacHelper framework. When Input Source Pro calls TISSelectInputSource on app focus, it triggers IMKInputSession activate on Vivaldi's main thread. Simultaneously, Chromium's text input bridge attempts to call firstRectForCharacterRange to query cursor position from the same IME session. Both calls block on XPC waiting for the other to complete, resulting in a deadlock.
The issue does not affect:
- Safari — uses native AppKit/WebKit text input and handles IME activation differently
- Firefox-based browsers (e.g., Zen) — use a completely different text input stack
- 主要语言
- Swift
- 星标
- 3.6k
- 派生
- 144
- 平均合并
- 4 小时 16 分钟
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
runjuu/InputSourcePro 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
runjuu/InputSourcePro#153 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
runjuu/InputSourcePro#152 ·
-
难度 3/5 1-2 天 新手友好度 55/100
runjuu/InputSourcePro#150 ·
-
难度 3/5 半天 新手友好度 30/100
runjuu/InputSourcePro#148 ·
-
难度 3/5 半天 新手友好度 50/100
runjuu/InputSourcePro#147 ·
查看 runjuu/InputSourcePro 的全部 Issue
相似的 Issue
-
🎉 Add PandaPal未关闭
难度 1/5 1 小时以内 新手友好度 62/100
jaywcjlove/awesome-mac#4192 ·
维护者通常 1 天内回复
-
@-mention suggestions don't match a display name typed without its spaces (Element Web does)可能已有人在做 @dwong716 今天认领。 未关闭T-Defect
难度 2/5 1-3 小时 新手友好度 78/100
element-hq/element-x-ios#6457 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 65/100
manaflow-ai/cmux#32617 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
skiptools/skip-fuse-ui#166 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
remko/age-plugin-se#25 ·