Skip to content

[Bug] OpenClaw.Tray.WinUI v2026.7.1 UI hang/crash (AppHang + APPCRASH combase.dll) under heavy agent event streaming #1150

Closed as duplicate

Description

@LCS-333888

描述 / 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

  1. 启动桌面 Companion v2026.7.1。
  2. 让 agent(例如默认 main 会话)产生流式回答或长命令输出。
  3. 客户端开始大量接收 agent 事件(日志中 Received event: agent、stream=item、stream=command_output),每秒可达数十条。
  4. 客户端 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),将作为评论上传。

Activity

  1. LCS-333888 commented on Aug 11, 2026

    @LCS-333888
    Author

    证据附件说明 / 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。如需通过其他渠道(如上传到临时存储、或提供本地访问方式)发送,请回复告知即可。

  2. added
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    impact:crash-loopThis 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.
    no-staleExempts this issue from stale automation.
    P1Urgent regression or broken agent/channel workflow affecting real users now.
    on Aug 11, 2026
  3. clawsweeper commented on Aug 11, 2026

    @clawsweeper

    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: canonical
    Canonical: #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:

    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:

    Likely related people:

    • Barbara Kudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Caleb Eden: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Karen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  4. AnvinaLI commented on Aug 12, 2026

    @AnvinaLI

    Additional repro evidence from the same version (v2026.7.1, Build 4206611), reproduced on 2026-08-12:

    1. 100% CPU on a single background thread on every launch - 3 consecutive launches (normal boot autostart + 2 manual restarts), all identical. All other threads idle/waiting.
    2. Network/event layer stays healthy the whole time: tick heartbeats, health checks and session.message events keep arriving and are logged, but the UI is unresponsive.
    3. 100% CPU persists in pure tray mode with no main window (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.
    4. Resetting last-chat-state.json (empty DefaultThreadId) before launch does not help.
    5. Repro is tied to active event flow on the bound session: after restart, CPU stays pinned at 100% as soon as session.message events 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.

  5. added
    status: 🚢 actively landingA maintainer or agent is actively driving this item through implementation, validation, or merge.
    and removed
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    on Aug 13, 2026
  6. 10 remaining items

  7. zhtty67-rgb commented on Aug 16, 2026

    @zhtty67-rgb

    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:

    Failed to assign to property 'Microsoft.UI.Xaml.Controls.Primitives.RangeBase.Minimum'. [Line: 0 Position: 0]
       at OpenClawTray.Pages.SandboxPage.InitializeComponent()  (SandboxPage.g.i.cs:99)
       at OpenClawTray.Windows.HubWindow.NavigateInternal(String tag)  (HubWindow.xaml.cs:710)
    

    Recorded twice in crash.log on 2026-08-16 (23:25:51 / 23:25:56); tray log shows Settings saved -> [SETTINGS] Change impact: UiOnly immediately before the crash. The element is SandboxPage.xaml:427:

    <Slider x:Name="TimeoutSlider" Minimum="5" Maximum="300" StepFrequency="5" Value="30" SmallChange="5" LargeChange="15" ValueChanged="OnTimeoutChanged" />

    Literals are valid (5 <= 30 <= 300) — looks like a WinUI RangeBase.Minimum property-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.log entry. 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.

  8. zhtty67-rgb commented on Aug 16, 2026

    @zhtty67-rgb

    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:

    Failed to assign to property 'Microsoft.UI.Xaml.Controls.Primitives.RangeBase.Minimum'. [Line: 0 Position: 0]
       at OpenClawTray.Pages.SandboxPage.InitializeComponent()  (SandboxPage.g.i.cs:99)
       at OpenClawTray.Windows.HubWindow.NavigateInternal(String tag)  (HubWindow.xaml.cs:710)
    

    Recorded twice in crash.log on 2026-08-16 (23:25:51 / 23:25:56); tray log shows Settings saved -> [SETTINGS] Change impact: UiOnly immediately before the crash. The element is SandboxPage.xaml:427:

    <Slider x:Name="TimeoutSlider" Minimum="5" Maximum="300" StepFrequency="5" Value="30" SmallChange="5" LargeChange="15" ValueChanged="OnTimeoutChanged" />

    Literals are valid (5 <= 30 <= 300) — looks like a WinUI RangeBase.Minimum property-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.log entry. 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.

  9. sebastian-openclaw commented on Aug 16, 2026

    @sebastian-openclaw

    Independent Omega reproduction on the same release: Companion v2026.7.1, commit 4206611f2b2e47cd575e1c8aa94e3e7708f6dd96.

    Recurring AppHang evidence

    • Observed UI hangs on 2026-08-13 around 14:00 and 2026-08-16 around 13:12 local time while the gateway remained healthy.
    • The Aug 13 hang followed session.message and then a very large agent-event stream.
    • During the reproduced Aug 16 13:12 hang, Companion logs showed approximately 495 agent events and 80 session.tool events in roughly two minutes, peaking around 114 log/event operations per second.
    • The native WinUI stopped updating/became unresponsive and Windows recorded AppHangB1; gateway health checks continued to pass.

    Exact-release source inspection matches this issue's proposed mechanism: OpenClawChatDataProvider.OnAgentEventReceived maps each event and calls ApplyEventAndPublish; each publication raises Changed, and the OpenClawReactorChatRoot handler calls setSnapshot(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.

  10. MilkyWay008 commented on Aug 20, 2026

    @MilkyWay008

    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

  11. removed
    status: 🚢 actively landingA maintainer or agent is actively driving this item through implementation, validation, or merge.
    on Sep 2, 2026
  12. added this to the 9/30 MXC Release milestone on Sep 4, 2026
  13. oywino commented on Sep 6, 2026

    @oywino

    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.

  14. github-actions commented on Sep 20, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  15. oywino commented on Sep 20, 2026

    @oywino

    Current-status update to prevent stale closure:

    This still appears unresolved and worth keeping open.

    I am not claiming that the separate 0xc000027b crash 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.

  16. locked as resolved and limited conversation to collaborators on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:linked-pr-openClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopThis 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.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions