-
Notifications
You must be signed in to change notification settings - Fork 149
P0: async void event handlers are a process-crash hazard across the WinUI codebase #552
Copy link
Copy link
Closed
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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.
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.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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
Give feedbackNo fields configured for issues without a type.
Problem
There are ~30+
async voidmethods in the WinUI layer (code-behind event handlers, node status callbacks, etc.). An unhandled exception in any of them bypasses WinUI'sUnhandledExceptionhandler and terminates the process.Notable locations:
src/OpenClaw.Tray.WinUI/App.xaml.cs—OnLaunched,ShowTrayMenuPopup,ToggleChannel,OnSshTunnelExitedsrc/OpenClaw.Tray.WinUI/Pages/*Page.xaml.cs—ConnectionPage,VoiceSettingsPage,PermissionsPage,ConfigPage, etc.src/OpenClaw.Tray.WinUI/Windows/*Window.xaml.cs—CanvasWindow.InitializeWebViewAsync,SetupWizardWindow,VoiceOverlayWindowsrc/OpenClaw.Connection/GatewayConnectionManager.cs—OnNodeStatusChanged,OnNodePairingStatusChangedsrc/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs—AckAction,ReadAloudPermissionsPage.EnsureWhisperModelDownloadedAsyncalready contains a gianttry/catchwith an explicit comment explaining this exact risk — which proves the team has been bitten by it before.Impact
Suggested fix
FireAndForget(Func<Task> work, Action<Exception>? onError = null)helper.InnerFooAsync().FireAndForget(_logger).async voidsignature, enforce a one-line body that delegates to the guarded helper.Files
src/OpenClaw.Tray.WinUI/App.xaml.cssrc/OpenClaw.Tray.WinUI/Pages/*.xaml.cssrc/OpenClaw.Tray.WinUI/Windows/*.xaml.cssrc/OpenClaw.Connection/GatewayConnectionManager.cssrc/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs