Repository navigation
Description
Summary
After #647 / PR #673 eliminated the cross-fixture multi-window teardown poisoning (a torn-off floating window being elected fallback PrimaryWindow → OnPrimaryWindowClosed → SafeExit → Application.Exit() firing Closed on the shared harness window → next fixture writing SystemBackdrop onto the dead window = 0xC0000005), a distinct, residual access violation remains: the full selftest suite still faults with 0xC0000005 at final process teardown when every fixture runs together in one process.
Distinct from #647
- Multi-window batch teardown 0xC0000005 ACCESS_VIOLATION at process exit (general dispose-ordering) #647 = cross-fixture poisoning mid-run — a dead reused window crashed a later fixture's mount. Fixed in PR Fix #647: multi-window teardown ACCESS_VIOLATION (0xC0000005) #673 (idempotent native close + process-wide closed-window registry gating every
SystemBackdropwrite + excluding floating windows from primary election). TheNativeDockingTearOffbatch now runs T01–T14 green, exit 0. - This issue = a fault only at final process exit when the entire suite runs together. It does not reproduce in any subset (
NativeDockingTearOff,Window,AspectRatio, and other windowing subsets all exit 0 individually) and is independent of the Multi-window batch teardown 0xC0000005 ACCESS_VIOLATION at process exit (general dispose-ordering) #647 docking change (present with and without it). This points to a separate, pre-existing final-shutdown native teardown ordering problem — most likely some window/AppWindow/interop object being released after its owner is already gone duringApplication.Exit()'s mass-Closedcascade at process end.
Repro
Run the full selftest suite in one process (ARM64 reproduces most readily):
dotnet run --project tests\Reactor.AppTests.Host -p:Platform=ARM64 --no-build -- --self-test
→ # Total failures: 0 (all fixtures pass), but the process exits with 0xC0000005 during final teardown. No individual subset reproduces it.
Suspected direction
Same umbrella as the original #647 analysis: a deterministic, idempotent pre-native-destroy teardown applied uniformly across all windows during Application.Exit(), and idempotent interop unregister (SetTitleBar / WindowMessageMonitor / backdrop) so the mass-Closed cascade at process exit can't release an object twice or touch an already-destroyed owner. The closed-window registry introduced in PR #673 (BackdropApplier.s_closedWindows) may be extendable to cover the remaining write/release sites that fault at shutdown.
Related
- Multi-window batch teardown 0xC0000005 ACCESS_VIOLATION at process exit (general dispose-ordering) #647 / PR Fix #647: multi-window teardown ACCESS_VIOLATION (0xC0000005) #673 (cross-fixture poisoning — fixed; this is the residual carved out of it)
- TitleBar explicit false close path can corrupt WinUI title-bar teardown #537 / PR fix(hosting): flip ExtendsContentIntoTitleBar before close to stop TitleBar heap corruption (#537) #646 (TitleBar
0xC0000374heap corruption — distinct, fixed) - Docking: OnFloatingWindowClosed can't be distinguished from cross-window dock-back #417 / PR Add DockFloatingCloseReason discriminator to floating-window close event (#417) #642 (added test-side double-close guards; observed the batch AV)
Activity
Address PR #767 review: tighten the self-test hard-exit path
test: stop the teardown guard asserting a cause the exit code cannot …
Fix the self-contradicting silent-death message when the trailer IS p…
test(selftest): interpret the Host exit code on truncated-TAP failures
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Add a packaged (MSIX) test tier so identity-dependent bugs are catchable
Drop the #1148 references from code and the manifest