Skip to content
Back to skills

Debug Dumps

ASecurity

Analyze and debug Windows crash dumps (.dmp) and app crashes for Agentmaster (the C++/WinRT WindowsTerminal fork) WITHOUT cdb/WinDbg — using the in-repo DIA-SDK + DbgHelp tools. Covers the loop: find the crash (WER Application Error event 1000 + the full dump in %LOCALAPPDATA%\CrashDumps), read the exception record + faulting registers (dumpexc), decode it (0xC0000005 access violation, 0xC0000409 __fastfail incl. CFG subcode 0xA freed-vtable, 0xC000027B stowed fail-fast, the 0xDDDDDDDD freed-...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
toolspythonrustgoc++shellbashnodetestingdebugginggit

Works with

  • terminal
  • api

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned December 6, 2026

npx -y skills add Nucs/Agentmaster --skill debug-dumps --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Debug Dumps?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Debug Dumps
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nucs-debug-dumps/badge)](https://www.skillsdirectory.com/skills/nucs-debug-dumps)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: debug-dumps
description: |
  Analyze and debug Windows crash dumps (.dmp) and app crashes for Agentmaster (the C++/WinRT
  WindowsTerminal fork) WITHOUT cdb/WinDbg — using the in-repo DIA-SDK + DbgHelp tools. Covers the loop:
  find the crash (WER Application Error event 1000 + the full dump in %LOCALAPPDATA%\CrashDumps), read the
  exception record + faulting registers (dumpexc), decode it (0xC0000005 access violation, 0xC0000409
  __fastfail incl. CFG subcode 0xA freed-vtable, 0xC000027B stowed fail-fast, the 0xDDDDDDDD freed-memory
  signature), walk the faulting stack (dumpwalk2, dumpourscan, dumpstack/hangwalk), and symbolize OUR frames
  against the matching build's PDBs to the exact source line. Encodes the hard-won patterns: matching the
  PDB by build time, "zero of our frames == a deferred XAML fail-fast off our stack (uncatchable)",
  use-after-free of reused XAML peers, fire_and_forget std::terminate, and why a try/catch cannot catch an
  AV (/EHsc) or a __fastfail. Includes a crasher (makedump) and its tiny test dump
  (test/sample-crash.dmp.gz). Use whenever an Agentmaster (or any native Windows app) instance crashes,
  hangs, or fail-fasts, when asked to analyze a .dmp / minidump / WER report, find a crash's root cause,
  symbolize a fault offset, or reason about an exception code / access violation / stowed exception /
  __fastfail.
keywords: crash, dump, minidump, .dmp, WER, Windows Error Reporting, CrashDumps, access violation, 0xC0000005, 0xC0000409, fastfail, __fastfail, STATUS_STACK_BUFFER_OVERRUN, 0xC000027B, STATUS_STOWED_EXCEPTION, stowed exception, 0xc000041d, STATUS_FATAL_USER_CALLBACK_EXCEPTION, CFG, FAST_FAIL_GUARD_ICALL_CHECK_FAILURE, use-after-free, UAF, dead-land, 0xDDDDDDDD, freed memory, dbghelp, DIA SDK, msdia140, StackWalkEx, symbolize, PDB, TerminalApp.pdb, fire_and_forget, std::terminate, XAML Islands, ToolTip, dumpexc, dumpwalk2, dumpourscan, dumpstack, hangwalk, diasym, makedump, hang, deadlock, faulting thread, exception record, root cause, no cdb, no WinDbg
---

# Debugging crashes & dumps (no cdb/WinDbg)

The battle-tested loop for finding the root cause of an Agentmaster (or any native Windows-app) crash on a
box with **no Debugging Tools for Windows installed** — using the DIA SDK + DbgHelp that ship with VS 2022.
Born from a run of C++/WinRT XAML-Islands crashes (tooltip use-after-frees, deferred fail-faults,
fire_and_forget terminates) diagnosed entirely from dumps.

## 0. Prerequisites (one-time)

- **VS 2022** with the C++ workload (any edition) — provides `cl.exe`, `dbghelp.lib`, and the **DIA SDK**
  (`<VS>\DIA SDK\include\dia2.h`) + `msdia140.dll`. No cdb/WinDbg needed.
- Build the tools once: `cmd /c .claude\skills\debug-dumps\scripts\build.bat` → the 8 analysis `.exe` + the
  `makedump` fixture generator land in `scripts\`. `build.bat` auto-detects VS via `vswhere` (falls back to
  Community) and finds the DIA SDK beside it. Re-run any time.
- **Git Bash note:** when passing Windows paths to these `.exe`, prefix the command with `MSYS_NO_PATHCONV=1`
  and use `\\`-escaped absolute paths, or MSYS mangles them.
- **msdia140.dll path:** the DIA tools `NoRegCoCreate` it from a hardcoded VS-Community path
  (`...\Common7\IDE\Automation\msdia140.dll`). On a non-Community edition, edit `kMsdia` in
  `dumpourscan.cpp`/`dumpstack.cpp`/`diasym.cpp` and rebuild.

## 1. Find the crash

Two artifacts. Get both:

```bash
# (a) The WER Application Error event — module + exception code + fault offset + package + timestamp:
powershell -NoProfile -Command "Get-WinEvent -FilterHashtable @{LogName='Application';Id=1000;StartTime=(Get-Date).AddHours(-1)} | ? { \$_.Message -like '*WindowsTerminal*' } | Select -First 3 | % { \$_.Message }"

# (b) The full dump WER wrote:
ls -la --time-style=full-iso "$LOCALAPPDATA/CrashDumps"/*.dmp | sort -k6,7 | tail
```

The WER event's `Faulting application path` + `package full name` tell you WHICH install crashed (Debug
`AgentmasterDev` vs Release `Agentmaster`), and its version. The dump filename is `<image>.<pid>.dmp`
(pid in decimal; the WER event prints it in hex — convert to match).

**⚠ Event 1000 + a LocalDumps dump does NOT prove the process DIED.** An AV raised inside a kernel→user /
COM-stub callback (input dispatch, the OLE drag-drop delivery) can be WER-reported — event 1000 + the full
dump — and then swallowed, the process continuing with corrupted framework state. Observed 2026-07-30: the
MUX tab-drag AV wrote a 1.4 GB dump at 22:47:22, then the SAME pid ran on for 90 s (hooks bridge delivering,
toast COM activation working, tab selection logging) in a wedged-UI state until the user quit. Before
reading a "crash then restart" story off WER, check the app's own log for post-event liveness (for
Agentmaster: hooks.log lines from that pid's engine AFTER the event-1000 timestamp — e.g. hook events, and
the user's own `[nav] quit confirmed`). The dump is still fully valid forensics either way — it captured
the exception in flight.

## 2. Match the PDB to the CRASHED binary — do this FIRST

Symbolization is only correct if the PDB matches the exact binary that crashed. **Compare timestamps:**

```bash
ls -la --time-style=full-iso '/q/agentmaster-layouts/<slot>'/TerminalApp.{dll,pdb}   # the crashed instance's InstallLocation
git log --format='%h %ci %s' -1 <your-fix-commit>   # did the crashed binary even contain your fix?
```

If the crashed binary was built AFTER a fix commit, that fix was present and **insufficient** — a real
signal (this is how we proved 5 tooltip fixes were each incomplete). The matching PDBs ship IN the
layout the instance runs from (`(Get-AppxPackage AgentmasterDev).InstallLocation` or `Agentmaster`'s
— a `Q:\agentmaster-layouts\<slot>` folder, 17 PDBs each): pass that folder as `<bindir>` to the
tools. The build tree's copies (`bin\x64\<Config>\<Project>\`, a junction to `Q:\tmp\agentmaster-bin`
since 2026-10-19 — every build writes to Q:) belong to the LAST build and are overwritten by the next
one, so they match a crashed instance only when nothing was built since its layout.

**Prove the match instead of comparing dates** (2026-10-23, `doc/agentmaster/SYMBOLS.md`): `pwsh -File
tools\Export-AgentmasterSymbols.ps1 -BinaryFolder <the crashed install's folder> -PdbSearchPath <folder(s) with
PDBs>` reads each binary's debug record and reports its PDB as Matched / Mismatch / Missing by the GUID + age the
debugger itself checks — a Mismatch PDB symbolizes garbage. Where the PDB of a crashed build comes from:
- **A published release** (e.g. production's MSIX install, `C:\Program Files\WindowsApps\Agentmaster_<ver>_…`, or
  a downloaded zip): from the release-symbols change on, every release has `Agentmaster_<ver>_<arch>_symbols.zip`
  (the FULL PDBs, Source-Linked) — download the one of the crashed version and pass its folder as `<bindir>`.
  The portable zip itself carries only PUBLIC PDBs (function names, no line numbers, no types). v0.8.0 and every
  earlier release have no PDBs anywhere: their dumps resolve to `Module+RVA` only.
- **A dev (Debug) slot**: its PDBs are FASTLINK — types and line tables stay in the object files, which the next
  Debug build rewrites. Symbolize a dev crash before the next dev build, or expect names only (DIA reports
  `isFastLinkPDB`; `mspdbcmf /CHECK <pdb>` too).

## 3. Read the exception — `dumpexc`

```bash
MSYS_NO_PATHCONV=1 ./scripts/dumpexc.exe "C:\path\to\crash.dmp"
```

Prints the exception code, `ExceptionInformation[]`, the decoded `__fastfail` subcode, and **all faulting
registers** + which module holds RIP. The registers are the highest-signal evidence — see §6.

## 4. Walk the faulting-thread stack

Three strategies, in order of preference — real optimized/stripped stacks defeat any single one, so try
them all and corroborate:

```bash
# (a) ORDERED walk via DbgHelp StackWalkEx (needs each module's .pdata; serves memory from the dump).
#     Best when it works; can stop short inside a module with no unwind info (e.g. MUX/system XAML).
MSYS_NO_PATHCONV=1 ./scripts/dumpwalk2.exe "<dmp>" "<bindir-with-PDBs>"

# (b) FULL-STACK SCAN for OUR frames — scans 512 KiB above RSP for return addresses into our modules,
#     symbolized via DIA, + an exception summary + a module histogram. Includes STALE frames (it's a
#     scan, not an unwind) so read it as "which of our functions are near the crash", corroborated by (a).
#     Optional 3rd arg = the "our module" substring (default: the Agentmaster set) for any app.
MSYS_NO_PATHCONV=1 ./scripts/dumpourscan.exe "<dmp>" "<bindir>" [ourModuleSubstring]

# (c) Fallbacks: dumpstack (naive scan of the inline thread-stack) / hangwalk (per-thread, for HANG dumps
#     with NO exception stream — procdump -h). diasym symbolizes a single module RVA (e.g. a WER offset).
MSYS_NO_PATHCONV=1 ./scripts/hangwalk.exe "<dmp>" "<imageDir>" "<pdbDir>" ALL SCAN
MSYS_NO_PATHCONV=1 ./scripts/diasym.exe "<bindir>\TerminalApp.pdb" 0x1234AB
```

## 4b. A `0xC000027B` (stowed exception) — decode its RECORDS first: `dumpstowed`

A XAML / WinRT fail-fast's own stack is a later pass (its `ProcessUnhandledError`); the cause is in the exception's
parameters: `ExceptionInformation[0]` = an array of pointers to `STOWED_EXCEPTION_INFORMATION_V2` records, `[1]` = how
many. Each record holds the HRESULT and **the stack captured when the error was raised**. Read them before anything else:

```bash
MSYS_NO_PATHCONV=1 ./scripts/dumpstowed.exe "<dmp>" "<the crashed build's PDB folder>" "Q:\\symcache"
```

- **One record per error XAML kept**: it also reports errors it recovered from EARLIER in the run. Each record's nested
  XAML block carries the time it was stowed (printed in local time): the fatal one is stowed seconds before the crash,
  the rest are residue (2026-12-05: four `E_FAIL` image failures from five hours earlier, then the fatal `E_UNEXPECTED`
  44 ms after the user's action).
- **System frames get names too**: Microsoft's public PDBs (Windows.UI.Xaml.pdb even has line numbers, types and
  parameter locations) are read from a symstore-layout cache. The tool ends with the symbol server URL and the cache
  path of every PDB a stack lacks: `curl -L -f -o "<cache path>" "<url>"`, then run it again. ⚠ The PDB's name can be
  lower case (`windows.ui.xaml.pdb`): the cache folder doesn't care on Windows, a case-sensitive grep of the URL does.
- The record's signature is the multi-character constant `'SE02'` = 0x53453032, so its bytes read "20ES"; the thread
  field is the thread id itself with the form in its low two bits (`& ~3`).
- Older tools: `tools/dumpstowed2.cpp` (crash #7's decoder, DbgHelp + a copied `symsrv.dll`; it also prints the dump's
  ProcessCreateTime and module timestamps). Not `tools/dumpstowed.cpp`: its signature check never matches.

## 5. The #1 interpretation rule — "zero of our frames"

If `dumpourscan` reports **0 OUR-module return addresses** on the faulting thread (histogram is all
`Windows.UI.Xaml.dll` / `Microsoft.UI.Xaml.dll` / `CoreMessaging.dll` / GPU `nvwgf2umx.dll` / the message
pump), the fault is **NOT synchronously called from our code** — it is a **deferred / async framework pass**
(XAML layout / render / composition / input routing) choking on state we set on an EARLIER, already-unwound
stack. Consequences, learned the hard way:

- The trigger is off your stack, so **no `try/catch` you add can catch it.** (And note: a `try/catch`
  can't catch an **access violation** at all under `/EHsc`, nor a **`__fastfail`** which bypasses SEH by
  design — regardless of stack.)
- Correlate by the **repro + exception type + timing** instead of a clean call chain. `0xC000027B` during a
  render pass while hovering tabs == the tooltip; an AV in a MUX TabView method during input == a recycled
  container; etc.
- The fix is **structural** — never leave the bad state for the async pass to find (drop/detach the object
  at teardown; don't reopen a torn-down peer) — not a guard at the (wrong) call site.

When `dumpourscan` DOES show our frames (e.g. a synchronous AV), the chain is the answer — read top-down.

## 5a. Read the crashed object's FIELDS — `diatype` + `dumpmem`

A chain says WHERE; the object's state says WHY. A full dump holds the object, and the build's PDB holds
its layout. Three steps (Debug build; verified 2026-10-05 on the terminal-start crash, UI_THREAD.md §10k):

```bash
# 1. Where the function keeps `this`: loc=3 (register-relative), reg=335 (RSP) / 334 (RBP), off = the
#    offset from that register AFTER the prologue. Any RVA inside the function works (dumpourscan prints
#    return addresses as function +offset; RVA = return RVA - offset).
MSYS_NO_PATHCONV=1 ./scripts/diatype.exe "<bindir>\Microsoft.Terminal.Control.pdb" func 6142E0
#    -> data this  loc=3 reg=335 off=896 (0x380)
# 2. The frame's RSP: the stack slot of the return address INTO this function (dumpourscan's "@0x..." of
#    its callee's return, i.e. the line naming this function) + 8. Read `this` from RSP + off:
MSYS_NO_PATHCONV=1 ./scripts/dumpmem.exe "<dmp>" <RSP+off hex> 0x8
# 3. The member offsets, then read them at this + offset:
MSYS_NO_PATHCONV=1 ./scripts/diatype.exe "<bindir>\Microsoft.Terminal.Control.pdb" udt "winrt::Microsoft::Terminal::Control::implementation::TermControl"
MSYS_NO_PATHCONV=1 ./scripts/dumpmem.exe "<dmp>" <this+0x480 hex> 0x100
```

- Check the RSP guess: in a Debug build the parameters are spilled to their home slots, so `this` usually
  sits 8 bytes above the return address that the CALL of this function pushed (dumpourscan's line that
  names the CALLER). When both readings give the same address, the frame is right. (2026-10-05:
  `_PointerMovedHandler +0x444` at `@…B7F8` → RSP `…B800` + `0x380` = `…BB80`; the caller's return at
  `@…BB78` + 8 = `…BB80`.)
- An `event_revoker` is a weak ref (8 bytes) + a token (8 bytes): all zero means "never subscribed / revoked".
- A C++/WinRT projection (`winrt::Foo` member) is one pointer to the ABI object; `nullptr` = empty.
- Optimized (Release) code keeps `this` in registers more often: read the Debug dump when you have both.

## 5b. WHICH XAML element? — name it from the dump (`diatype`, `diasym`, `xamlwalk.py`)

A stowed stack names XAML's handler (`ToolTipService::OnOwnerPointerEntered`), never the element it ran for. With a full
dump and XAML's public PDB (§4b fetches it), the element can be read out (verified 2026-12-05, crash #8 of
`doc/agentmaster/HANDOVER_tab-tooltip.md` §11):

```bash
P="Q:\\symcache\\Windows.UI.Xaml.pdb\\<key>\\Windows.UI.Xaml.pdb"   # dumpstowed printed <key>
# 1. The failing branch: disassemble the stowed frame's function (dumpbin from vcvars64; base 0x180000000 + RVA), and
#    name its callees with diasym (--find lists functions by wildcard: 'DirectUI::ToolTipService::*').
dumpbin /nologo /disasm:nobytes /range:0x180305400,0x1803056A0 C:\Windows\System32\Windows.UI.Xaml.dll
MSYS_NO_PATHCONV=1 ./scripts/diasym.exe "$P" --find 'DirectUI::ToolTipService::*'
# 2. The element: a raise goes through CommonBrowserHost::CLR_FireEvent(this, pListener, hEvent, pSender, pArgs, ...).
#    diatype gives each parameter's slot (RSP + off). The frame's RSP = the stack slot dumpourscan shows for the return
#    address INTO its caller ("@0x..  +0x11BD9B CControlBase::ScriptCallback") - so its parameters' home slots start 8
#    bytes above that slot. Home slots can be reused: trust a slot whose object names a sensible class (step 3).
MSYS_NO_PATHCONV=1 ./scripts/diatype.exe "$P" func 0x3EB30          # any RVA inside CLR_FireEvent
MSYS_NO_PATHCONV=1 ./scripts/dumpmem.exe "<dmp>" <slot of the return address + 8> 0x38
# 3. Its class: the first 8 bytes of a native core object are its vtable; diasym names a vtable RVA
#    ("CGrid::`vftable'"). 4. Where it is, and what it shows:
python -I scripts/xamlwalk.py "<dmp>" "$P" parents <element>   # the m_pParent chain, x:Names, peers
python -I scripts/xamlwalk.py "<dmp>" "$P" subtree <element>   # children, TextBlock texts (a card's title)
```

- XAML's own core objects are `C*` classes (`CGrid`, `CTextBlock`); each has a DXaml peer (`ctl::ComObject<DirectUI::Grid>`)
  — `xamlwalk.py` prints both. A named element (`x:Name`, e.g. TerminalPage's `ContentArea`) anchors the chain.
- `xamlwalk.py`'s member offsets were read with `diatype udt CDependencyObject` / `CUIElement` / `CDOCollection` /
  `CTextBlock` for one XAML build; check them with diatype when a walk reads garbage on another.
- Then PROVE the mechanism outside the app: a small island probe under a real mouse in a claude-desktops Windows
  desktop (`tools/xaml-tooltip-detach-probe` is the template: one case per process, the exit code is the verdict,
  WER LocalDumps in the guest, `dumpstowed` on the guest's dump with the guest's own XAML PDB).

## 6. Reading the evidence — exception codes & register signatures

Quick reference (full table in `reference/exception-codes.md`):

- **`0xC0000005` — access violation.** `ExceptionInformation[0]` = 0 read / 1 write / 8 execute;
  `[1]` = the faulting data address. `[1] == 0` → null deref. `[1] == 0xFFFFFFFFFFFFFFFF` → a
  **non-canonical** address (a garbage/freed pointer with high bits set → a GP fault reported as -1).
- **`0xDDDDDDDDDDDD....` in a faulting register (Rax/Rcx/…)** → the MSVC **debug-CRT freed-block fill**
  ("dead-land", byte `0xDD`). A register holding it == the code dereferenced **freed memory** →
  **use-after-free.** (`0xCDCDCDCD` = uninitialized heap; `0xFEEEFEEE` = freed by HeapFree; `0xBAADF00D`
  = uninitialized LocalAlloc.) This one register is often the whole diagnosis.
- **`0xC0000409` — `__fastfail` / STATUS_STACK_BUFFER_OVERRUN.** NOT always a stack overrun — it's the
  generic fast-fail. `ExceptionInformation[0]` is the **subcode**: `2` = /GS stack-cookie corruption,
  `7` = `FATAL_APP_EXIT` (a `std::terminate` / `winrt::terminate` — e.g. an exception escaping a
  `fire_and_forget` or a `noexcept`), **`0xA` = `GUARD_ICALL_CHECK_FAILURE`** (CFG caught an
  indirect/virtual call through a **freed/corrupt vtable** → also a UAF, just caught at the call).
- **`0xC000027B` — STATUS_STOWED_EXCEPTION.** A WinRT/XAML **fail-fast**: an internal error was "stowed"
  then the process fail-fasts (via `KERNELBASE!RaiseException`). Classic under XAML Islands for an
  **owner-less / unplaceable popup** (tooltips). Uncatchable; almost always off-stack (§5).
- **`0xC000041D` — STATUS_FATAL_USER_CALLBACK_EXCEPTION.** An exception thrown through a kernel→user
  callback (a window proc / XAML callback). Usually the **escalation** of a primary AV a moment earlier —
  find the earlier dump/event at the same offset (that's the root; this is the death rattle).
- **`0xC0000374` — STATUS_HEAP_CORRUPTION.** `ExceptionInformation[0]` points at ntdll's
  `HEAP_FAILURE_INFORMATION` — read it from a FULL dump with `dumpmem` (`{u32 Version; u32 Size;
  u32 FailureType; …; pvoid Heap; pvoid Address; …}`), then hexdump the block it names (overrun bytes
  often contain the WRITER'S data). The corruption was planted EARLIER than the reporting stack — the
  detector fires on a later alloc/free. A named Address "not present in Memory64ListStream" on a full
  dump == a **decommitted page** (heap metadata pointing into freed space). **Before deep heap
  forensics:** a DETERMINISTIC startup `0xC0000374` inside the XamlTypeInfo / type-activation machinery,
  on a binary built incrementally AFTER a mid-compile out-of-memory failure (C1076 "internal heap limit"
  / C3859 "Failed to create virtual memory for PCH"), has been a **poisoned incremental build** — the
  failed run leaves ABI-mixed objs/tlogs and the next incremental link mixes them (verified 2026-07:
  three identical startup crashes, zero changed code on the stack). Run the discriminating experiment
  first: purge `obj/x64/<cfg>/TerminalApp*` + both `Generated Files` dirs + the layout `resources.pri`,
  clean-rebuild, relaunch — vanishing with zero source changes == build state, not code.

## 7. Common Agentmaster crash CLASSES + the fix shape (from real dumps)

- **Reused XAML peer use-after-free.** A held WinRT strong ref keeps a *projection* alive while the
  framework tore down its *native peer* (owner recycled, popup closed async). Calling any method → AV
  (`0xDDDD`) or CFG fail-fast (`0xA`). Fix: **drop + detach** the object at every teardown; **create fresh
  per use**; never reopen across a close; serialize open-after-close across siblings.
- **`fire_and_forget` that can `std::terminate`.** Any exception escaping a `winrt::fire_and_forget`
  fatal-fails (`0xC0000409` subcode 7). Fix: wrap the body in `try/catch(...)`. If it must `co_await`
  mid-body, make the body an `IAsyncAction` and `co_await` it inside the shell's `try` (co-awaiting an
  IAsyncAction *propagates* the exception to the awaiter instead of terminating).
- **Iterator / map-node use-after-free.** Using a `[key, val]` structured-binding reference after
  `erase(key)` hashes freed memory. Fix: copy the key first.
- **Eager `connection.Start()` before control init** → AV in `Microsoft.Terminal.Control.dll` on startup.
  (See the project CLAUDE.md "Gotchas".)
- **Input reaches a terminal that has not started** (2026-10-05, dev + release, UI_THREAD.md §10k). AV
  reading a small address (`0xFA` / `0xD8`) in `TextBuffer::GetSize` / `Terminal::GetHyperlinkIdAtViewportPosition`,
  chain `TermControl::_PointerMovedHandler` → `ControlInteractivity::PointerMoved` → `ControlCore::_updateHoveredCell`,
  right after a new tab opened (a fork). `_mainBuffer` is null because `ControlCore::Initialize` never ran.
  The XAML fact behind it: **XAML raises `Loaded` only in its frame tick, but it runs `UpdateLayout()` before
  EVERY hit test** (`CUIElement::BoundsTestEntry`), so input can hit an element that is laid out but not
  `Loaded` yet. Anything that must be ready before input (a terminal's start) belongs in the element's
  first `SizeChanged` / layout, never in `Loaded` alone. Fixed in a790584c9.

- **Our handler makes the framework's NEXT handler fail** (2026-12-05, crash #8 of HANDOVER_tab-tooltip.md):
  `0xC000027B`, the fatal stow `E_UNEXPECTED` in `DirectUI::ToolTipService::OnOwnerPointerEntered`
  (`tooltipservice_partial.cpp:1477`; `OnOwnerGotFocus` line 1773 for a focus raise), zero of our frames. XAML calls a
  raise's handlers from the list it captured when the raise began: our handler on the element, added before the
  tooltip was attached, took the element's tooltip off, and ToolTipService's handler (added at the attach, so after
  ours) still ran and found none. Fix shape: never null an element's tooltip from inside that element's own
  `PointerEntered` / `GotFocus` — defer it one dispatcher tick, guarded so it removes only that ToolTip
  (`AgentSessionToolTipHost::Detach`). Replacing a tooltip, or nulling it on a pointer EXIT or from a child's
  handler, is safe (`tools/xaml-tooltip-detach-probe`).

## 8. Confidence & honesty

State confidence explicitly. A register-level proof (`0xDDDD` freed-fill, a decoded fastfail subcode) is
**conclusive**. A `dumpourscan` chain is **strong** but includes stale frames — corroborate with
`dumpwalk2`. An off-stack fail-fast (§5) tied to a repro is **circumstantial** — say so, and prefer a
structural fix over a point guard. If a fix ships and the SAME crash recurs on a binary built AFTER it
(§2), the hypothesis was wrong or incomplete — escalate to the structural/architectural fix, don't
re-patch the same spot.

## 9. Testing the toolchain

A self-contained fixture — a tiny crasher (`scripts/makedump.cpp`) that reproduces the freed-fill AV
signature and writes a small, **non-sensitive** dump — plus that compressed dump. See `test/README.md`:

```bash
gunzip -k test/sample-crash.dmp.gz                                   # or: ./scripts/makedump.exe test\sample-crash.dmp
MSYS_NO_PATHCONV=1 ./scripts/dumpexc.exe   "<abs>\test\sample-crash.dmp"                    # AV, Rcx=0xDDDD.., faultData=-1
MSYS_NO_PATHCONV=1 ./scripts/dumpwalk2.exe "<abs>\test\sample-crash.dmp" "<abs>\scripts"    # FaultDeep -> wmain (+ source lines)
MSYS_NO_PATHCONV=1 ./scripts/dumpourscan.exe "<abs>\test\sample-crash.dmp" "<abs>\scripts" makedump
```

## Files

- `scripts/dumpexc.cpp` — exception record + `ExceptionInformation` + decoded fastfail subcode + faulting registers + module-of-RIP.
- `scripts/dumpwalk2.cpp` — ordered `StackWalkEx` walk; serves stack/memory from the dump; DbgHelp symbols.
- `scripts/dumpourscan.cpp` — 512 KiB stack scan for OUR frames (DIA-symbolized) + exception params + module histogram; optional module filter.
- `scripts/dumpstack.cpp` — naive inline-stack scan + DIA symbolize (fallback for small/odd dumps).
- `scripts/dumpmem.cpp` — hexdump arbitrary virtual memory FROM a full dump (`dumpmem <dmp> <hexAddr> <bytes>`; hex + wchar + ascii columns) — the `0xC0000374` heap-forensics companion (read the `HEAP_FAILURE_INFORMATION`, then the corrupt block). Build: `cl /nologo /std:c++20 /EHsc /W3 dumpmem.cpp` in `scripts\` (no DIA needed).
- `scripts/hangwalk.cpp` — per-thread walk/scan for HANG dumps (no exception stream; procdump `-h`).
- `scripts/diasym.cpp` — symbolize a single `<pdb> <rva>` (e.g. a WER fault offset); an RVA no function covers is named as its public or data symbol (a vtable names an object's class, §5b); `--find <pattern>` lists the functions matching a `*`/`?` wildcard with their RVAs (what to disassemble).
- `scripts/diatype.cpp` — a type's member layout (`udt <name>`, base classes included) or a function's `this`/locals locations (`func <rva>`), for reading a crashed object's fields with `dumpmem` (§5a); Microsoft's public Windows.UI.Xaml.pdb answers both (§5b).
- `scripts/dumpstowed.cpp` — decode a `0xC000027B` dump's stowed-exception records: each HRESULT, when it was stowed, and the stack captured then, our frames from the build's PDBs and system frames from a symstore cache, plus the symbol server URL of every PDB missing (§4b).
- `scripts/xamlwalk.py` — name a XAML element in a full dump: its class (vtable), x:Name, DXaml peer, and its parent chain or subtree with the TextBlocks' texts (§5b). Python 3, standard library only; calls `diasym.exe`.
- `scripts/makedump.cpp` — the fixture generator (a safe, tiny crash dump reproducing the UAF signature).
- `scripts/build.bat` — build them all (VS + DIA auto-detect).
- `reference/exception-codes.md` — the full code / register-signature reference.
- `test/sample-crash.dmp.gz` + `test/README.md` — the compressed test fixture + how to use it.

Files in this skill

  • .gitignore490 B
  • SKILL.md26.1 KB
  • reference/exception-codes.md4.6 KB
  • scripts/build.bat3.1 KB
  • scripts/diasym.cpp6.3 KB
  • scripts/diatype.cpp10.1 KB
  • scripts/dumpexc.cpp5.6 KB
  • scripts/dumpmem.cpp3.9 KB
  • scripts/dumpourscan.cpp9.6 KB
  • scripts/dumpstack.cpp7.8 KB
  • scripts/dumpstowed.cpp24.1 KB
  • scripts/dumpwalk2.cpp6.3 KB
  • scripts/hangwalk.cpp9.2 KB
  • scripts/makedump.cpp3.2 KB
  • scripts/xamlwalk.py13.5 KB
  • test/README.md2.7 KB
  • test/sample-crash.dmp.gz6.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.