microsoft / microsoft/winappCli

winapp run --debug-output can report an earlier handled exception instead of the crash

Open
#836 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.3k
Forks
80
Avg merge
3d 6h
Merged PRs (30d)
51

Description

### Problem

While running AI Dev Gallery with `winapp run --aot --debug-output`, the crash dump recorded an earlier, handled startup exception instead of the actual fatal exception.

Evidence from the same run:

| | Actual crash event | Dump exception record |
|---|---|---|
| Thread | 14096 | 12008 |
| Exception | `0xC0000409` | `0xE06D7363` |

The dump's exception record matches a first-chance exception cached during startup. The actual crashing thread is present in the dump, but the reported stack contains only `KERNELBASE!RaiseException`. WinUI/XAML triage did run and captured additional stacks in the debug log.

### Expected

Use the fatal event's thread and exception context as the primary crash context. Keep earlier first-chance information as clearly labeled supplemental diagnostics, rather than replacing the crash context.

### Environment

CLI: `0.6.3-nmetulev-native-aot-publish-run.73`, Windows x64, WinUI 3 NativeAOT app.

This was observed with NativeAOT, but appears to concern shared crash-dump handling. A minimal standalone repro is not yet available.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the winapp run --debug-output crash-dump handling path and compare how the fatal event from the crashing thread is selected against the earlier cached first-chance exception. Done means the fatal thread and exception context are primary, while earlier first-chance details remain clearly labeled supplemental diagnostics; validate against the reported NativeAOT WinUI 3 scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.