Repository navigation
[Bug] OpenClaw.Tray.WinUI v2026.7.1 UI hang/crash (AppHang + APPCRASH combase.dll) under heavy agent event streaming #1150
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.This issue is about crashes, hangs, restart loops, or process-level availability.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Milestone
Description
描述 / Description
OpenClaw Companion 桌面客户端(OpenClaw.Tray.WinUI.exe)v2026.7.1 在 agent 会话活动、流式输出时,UI 线程会反复无响应(AppHang),严重时崩溃(APPCRASH),需要反复手动重启。核心问题疑似是 UI 线程在收到大量 agent 流式事件时被事件风暴刷死。
The OpenClaw Companion desktop client (OpenClaw.Tray.WinUI.exe) v2026.7.1 repeatedly hangs (AppHang) and sometimes crashes (APPCRASH) when an agent session is active with streaming output. Suspected root cause: the UI thread is overwhelmed by a flood of agent streaming events.
复现步骤 / Steps to reproduce
- 启动桌面 Companion v2026.7.1。
- 让 agent(例如默认 main 会话)产生流式回答或长命令输出。
- 客户端开始大量接收
agent事件(日志中Received event: agent、stream=item、stream=command_output),每秒可达数十条。 - 客户端 UI 卡住 → 几秒到几十秒后被系统判定无响应(
AppHangTransient/AppHangB1),严重时直接崩溃退出。
预期行为 / Expected
客户端应能正常处理事件流,不卡顿、不崩溃。
实际行为 / Actual
UI 线程在事件风暴下挂起/崩溃,频繁出现,需手动重启客户端。
环境 / Environment
- OS: Windows 10.0.26200 (x64)
- OpenClaw.Tray.WinUI.exe v2026.7.1 (Build 4206611)
- Node: 22.23.2
- 网关: OpenClaw 2026.7.1-2
崩溃证据 / Crash evidence
- APPCRASH 模块:
CoreMessagingXP.dll+combase.dll,异常代码0xc000027b - 多次
AppHangTransient(UI 无响应)、AppHangB1(UI 挂起被强制关闭)、Application Error 1000 - 崩溃转储:
OpenClaw.Tray.WinUI.exe.21280.dmp(43MB,22:52 生成) - 客户端日志: 事件风暴期间每秒数十条
agent事件
备注 / Notes
- 将客户端
LogLevel从trace降为warn对运行时无效;default-config.json看起来是安装器模板而非运行时配置,望确认。 - 网关与网页版(dashboard)工作正常,问题仅在桌面 WinUI 客户端。
附件 / Attachments
崩溃转储(2)、客户端日志、事件记录、版本信息已打包为 zip(约 20MB),将作为评论上传。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopThis issue is about crashes, hangs, restart loops, or process-level availability.This issue is about crashes, hangs, restart loops, or process-level availability.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Activity
LCS-333888 commentedon Aug 11, 2026
证据附件说明 / Evidence attachments note
已收集并打包崩溃证据,因 GitHub issue 不支持直接附件,暂通过此处说明、可按需提供给维护者:
OpenClaw.Tray.WinUI.exe.21280.dmp(43MB,22:52 崩溃转储)OpenClaw.Tray.WinUI.exe.23904.dmp(41MB,8/7 崩溃转储)openclaw-tray.log(事件风暴日志)crash-events.txt(12 条崩溃/挂起事件记录)version-info.txt(版本信息)原始文件压缩包约 20MB,位于本机
D:\AI\OpenClaw-Downloads\Files\openclaw-crash-bug-report-20260811-230834.zip。如需通过其他渠道(如上传到临时存储、或提供本地访问方式)发送,请回复告知即可。clawsweeper commentedon Aug 11, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 2, 2026, 1:21 PM ET / 17:21 UTC.
Summary
Keep open. Current main still converts processed agent events into individual snapshots, queues each snapshot onto the WinUI dispatcher, and immediately applies each one to the native chat render root. The linked open repair PR explicitly owns the bounded/coalesced fix, so a second fix lane would duplicate active work.
Reproducibility: yes. at source level. A burst of accepted agent events reaches one Publish call per resulting snapshot, each producing a dispatcher callback and native setSnapshot render; no live Windows reproduction was executed in this read-only review.
Root-cause cluster
Relationship:
canonicalCanonical: #1150
Summary: This issue is the canonical report for live agent-event streaming saturation. The linked PR is the candidate repair, while the history-projection report describes a distinct trigger.
Members:
fixed_by_candidate: fix(tray): bound streaming UI dispatch work #1158 - Its supplied body explicitly closes this issue and implements the bounded/coalesced streaming repair, but it remains open.adjacent_distinct: [Bug] Switching sessions can hang WinUI while projecting ~200 history messages (v2026.7.1) #1167 - Its supplied report identifies a session-switch history-projection hang rather than a high-rate live event stream.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
The open linked repair PR #1158 already owns the bounded-dispatch change, so another automated fix PR would duplicate active work.
Review details
Best possible solution:
Land a narrowly validated bounded/coalesced event-publication path that preserves lifecycle events and proves the tray remains responsive under a real high-rate Windows agent-event stream.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level. A burst of accepted agent events reaches one Publish call per resulting snapshot, each producing a dispatcher callback and native setSnapshot render; no live Windows reproduction was executed in this read-only review.
Is this the best way to solve the issue?
Yes, conditionally. Bounding disposable event work and coalescing snapshot delivery addresses the demonstrated queue-and-render amplification path, but the linked implementation still needs current-head Windows proof before it resolves the report.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 2cf875d5529a.
Label changes
Label justifications:
P1: Multiple reporters describe recurring WinUI hangs during active agent sessions, while gateway health continues to operate.impact:crash-loop: The issue documents AppHang symptoms and occasional desktop-client process crashes.Evidence reviewed
What I checked:
src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs:1397, 2cf875d5529a)src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs:1810, 2cf875d5529a)src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs:84, 2cf875d5529a)src/OpenClaw.Tray.WinUI/App.xaml.cs:600, 2cf875d5529a)src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs, f8a8825ccbb4)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.AnvinaLI commentedon Aug 12, 2026
Additional repro evidence from the same version (v2026.7.1, Build 4206611), reproduced on 2026-08-12:
session.messageevents keep arriving and are logged, but the UI is unresponsive.MainWindowHandle == 0) - so this is not only about rendering an open chat window; the dispatcher path keeps spinning even when no chat window is shown.last-chat-state.json(emptyDefaultThreadId) before launch does not help.session.messageevents arrive (the agent session has a long history, seq > 2800).This matches the two per-event WinUI dispatcher queue paths described in the review - the coalescing fix should address it. Happy to share
openclaw-tray.log+ thread-level CPU sampling details if useful.10 remaining items
zhtty67-rgb commentedon Aug 16, 2026
Same build (v2026.7.1 / 4206611) — confirming, and adding a separate crash path not covered by the streaming-storm description:
SandboxPage XamlParseException (deterministic): navigating to the Sandbox page (or saving any setting that triggers a UI refresh to it) throws an unhandled
XamlParseException:Recorded twice in
crash.logon 2026-08-16 (23:25:51 / 23:25:56); tray log showsSettings saved -> [SETTINGS] Change impact: UiOnlyimmediately before the crash. The element isSandboxPage.xaml:427:Literals are valid (5 <= 30 <= 300) — looks like a WinUI
RangeBase.Minimumproperty-assignment failure during XAML load, not a bad value.Workaround that works for us: downgraded to v0.6.12 — same XAML, but does not crash (different WinAppSDK). Verified by selecting the 沙盒 (Sandbox) nav item under 0.6.12: process stays alive, no new
crash.logentry. Also had to re-approve device pairing after the downgrade (openclaw devices approve) — fine afterwards.Environment: Windows 11, tray v2026.7.1 (4206611), gateway 2026.7.1-2, also reproduced AppHang (100% CPU single thread) matching the report above.
zhtty67-rgb commentedon Aug 16, 2026
Same build (v2026.7.1 / 4206611) — confirming, and adding a separate crash path not covered by the streaming-storm description:
SandboxPage XamlParseException (deterministic): navigating to the Sandbox page (or saving any setting that triggers a UI refresh to it) throws an unhandled
XamlParseException:Recorded twice in
crash.logon 2026-08-16 (23:25:51 / 23:25:56); tray log showsSettings saved -> [SETTINGS] Change impact: UiOnlyimmediately before the crash. The element isSandboxPage.xaml:427:Literals are valid (5 <= 30 <= 300) — looks like a WinUI
RangeBase.Minimumproperty-assignment failure during XAML load, not a bad value.Workaround that works for us: downgraded to v0.6.12 — same XAML, but does not crash (different WinAppSDK). Verified by selecting the 沙盒 (Sandbox) nav item under 0.6.12: process stays alive, no new
crash.logentry. Also had to re-approve device pairing after the downgrade (openclaw devices approve) — fine afterwards.Environment: Windows 11, tray v2026.7.1 (4206611), gateway 2026.7.1-2, also reproduced AppHang (100% CPU single thread) matching the report above.
sebastian-openclaw commentedon Aug 16, 2026
Independent Omega reproduction on the same release: Companion v2026.7.1, commit
4206611f2b2e47cd575e1c8aa94e3e7708f6dd96.Recurring AppHang evidence
session.messageand then a very large agent-event stream.agentevents and 80session.toolevents in roughly two minutes, peaking around 114 log/event operations per second.AppHangB1; gateway health checks continued to pass.Exact-release source inspection matches this issue's proposed mechanism:
OpenClawChatDataProvider.OnAgentEventReceivedmaps each event and callsApplyEventAndPublish; each publication raisesChanged, and theOpenClawReactorChatRoothandler callssetSnapshot(args.Snapshot), producing a render for every publication. This independently supports the bounded/coalesced publication direction in #1158.Scope clarification
Omega also reproduced a session-switch hang while loading approximately 200 history messages. That path is now tracked separately in #1167 because it can require batching the initial history projection/render even after per-event streaming updates are coalesced.
There was one 2026-08-13 crash involving
CoreMessagingXP.dll, but the available evidence does not establish that the crash and the recurring AppHang/UI-saturation path have the same cause. This confirmation should therefore be treated as evidence for the recurring AppHang behavior, not as attribution of that separate crash.MilkyWay008 commentedon Aug 20, 2026
Saw the 0xc000027b crash in CoreMessagingXP.dll too, that's the nasty one. The reproducible bit looks like the SandboxPage TimeoutSlider failing to set RangeBase.Minimum (SandboxPage.xaml:427), which then blows up in native code, so it reads like a XAML binding bug rather than your box. Sticking with the v0.6.12 downgrade is the sane call until they patch it, and the crash bundle you grabbed is exactly what the maintainers need. Oh btw, when these agent updates leave an install half-broken I keep a portable Hermes OTG on a USB stick around to diagnose the sick one side-by-side, imo it's saved me a few times, https://github.com/MilkyWay008/Hermes-OTG
oywino commentedon Sep 6, 2026
Additional observation from my system:
I previously reproduced the WinUI hang/crash with the same CoreMessagingXP.dll / 0xc000027b signature. At the time of the hang, I noticed that two OpenClaw.Tray.WinUI.exe processes were running even though I only launched it once. I then killed both processes, started the Companion once, and again it launched a second process by itself, and hung.
I then killed both processes, started the Companion once with the Gateway stopped, and confirmed only one process existed. After starting the Gateway, the Companion automatically reconnected and remained responsive. A process check showed exactly one OpenClaw.Tray.WinUI.exe.
So on my system, Gateway connectivity/event streaming by itself is currently not sufficient to reproduce the hang. The hang I observed coincided with two Companion instances being present.
I have not yet determined what caused the second Companion instance to start, so I cannot say whether duplicate instances are the root cause, a contributing factor, or unrelated. But it may be worth checking whether multiple tray instances exacerbate the dispatcher/event-stream problem addressed by #1158.
A single manual launch appeared to start two Companion instances concurrently. Evidence: the Companion startup/greeting notification appeared twice. Only one tray icon was visible. Task Manager initially showed one OpenClaw.Tray.WinUI.exe; after terminating it, another running instance became visible and could also be terminated.
github-actions commentedon Sep 20, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updated OpenClaw Windows details or it will be closed.
oywino commentedon Sep 20, 2026
Current-status update to prevent stale closure:
This still appears unresolved and worth keeping open.
mainstill routes each received agent event individually throughGatewayService.OnAgentEventReceived()→EnqueueModelUpdate(() => _state.AddAgentEvent(evt)), so the high-rate dispatcher-pressure path identified in this issue is still present at least at that layer.I am not claiming that the separate
0xc000027bcrash necessarily has the same cause as the recurring AppHang/event-stream saturation. The useful point here is that the source-proven streaming-pressure issue does not appear to have a landed fix yet.My earlier duplicate-Companion-process observation remains documented above, but I do not currently have a fresh reproduction of that behavior on the latest build.