acdream/src/AcDream.App
Erik 691b925952 fix #406: launcher session exit observation carries the real code + captures client stderr
GameWindow.Dispose() (via Program.cs's `using var window = ...`) runs
unconditionally even when invoked mid-unwind of an exception that escaped
Run()'s Silk.NET frame loop. Resource teardown itself can converge
cleanly regardless, so CompleteShutdown had no way to tell "normal Run()
return" from "a crash is propagating through me right now" and always
wrote the hardcoded exited{code:0,reason:"graceful"} — exactly the
symptom #406 observed against a real 0xE0434352 crash. Fixed by latching
_runFailure in Run()'s existing catch block (before the pre-existing
throw) and consulting it from a new ReportExited method, the one call
site for the terminal status write: crashed(1)/graceful(0)/
shutdown-incomplete(1) as appropriate. No wire-contract amendment needed
— §LA1 pins the exited event NAME, and reason is already free text that
StatusEventParser round-trips unchanged.

Sibling gap fixed in the same commit: the launcher discarded the child's
stdout/stderr entirely, which is why diagnosing this exact crash required
a manual console re-run. Added BoundedProcessOutputCapture, a 2 MiB-capped
sink mirroring SessionStatusWriter's open-append-flush-close-per-write
posture (a long-lived write handle is not actually concurrently readable
on Windows even with FileShare.Read — confirmed by isolated repro), wired
into both SystemChildProcess (ProcessStartInfo.RedirectStandardError;
Linux + Windows graphical children, i.e. this bug's own scenario) and
WindowsSystemChildProcess (a real native pipe via CreateChildOutputPipe,
mirroring the existing stdin pipe; Windows console-capable/Headless
children). Opt-in via LauncherProcessSpec.StderrLogPath (null = unchanged
behavior), threaded through SessionConfigComposer -> client.err.log
beside status.jsonl -> LauncherExecutableSet -> LauncherOrchestrator.

Tests: GameWindowCrashStatusTests (source-shape, matching the existing
GameWindow test pattern — the class cannot be constructed without a live
GPU/window), BoundedProcessOutputCaptureTests (10 unit tests), and three
new LauncherProcessSupervisorTests spawning real child processes through
both capture code paths.

Launcher.Core.Tests: 337/0 (was 324/0). Launcher.Tests: 67/0 (unchanged).
Full solution build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-16 11:44:46 +02:00
..
Audio feat(audio): Ctrl+M instant mute + inn-chatter investigation closed as server content 2026-08-09 14:09:24 +02:00
Combat fix(ui,runtime): OP4 review fixes — live re-seed, enable-gating, Combat panel re-point, universal timestamps 2026-08-11 05:30:26 +02:00
Composition fix #405: chargen/summary preview leases never Transferred — every retail-UI window load crashed at composition 2026-08-16 08:38:07 +02:00
Configuration feat(runtime): share chat commands and run login sequence 2026-08-14 20:27:45 +02:00
Credentials fix(launcher): close Campaign LA LA1 review findings 2026-08-14 17:00:09 +02:00
Diagnostics feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
Input refactor(settings): OP9 — retire the dead F11 settings surface + fully-superseded GameplaySettings 2026-08-11 13:18:53 +02:00
Interaction chore: secure-trade closeout - strip [trade] gate probes, roadmap ledger 2026-08-14 12:48:31 +02:00
Net fix(chargen): Campaign CC CC5 re-review residuals R1-R5 + nits — REVIEW-CLOSED 2026-08-16 01:57:07 +02:00
Physics refactor(physics): hoist the live-entity collision builder to Runtime (#330 groundwork) 2026-08-07 01:49:13 +02:00
Platform docs: Campaign LA — pinned launch-contract schema COMMITTED into plan LA1 2026-08-14 16:04:32 +02:00
Plugins fix(plugins): close LA5 host lifecycle review 2026-08-14 19:05:13 +02:00
Rendering fix #406: launcher session exit observation carries the real code + captures client stderr 2026-08-16 11:44:46 +02:00
Runtime feat(chargen): Campaign CC slice CC5 — Summary page, Finish flow, RandomizeCharacter port 2026-08-16 00:01:07 +02:00
Settings fix #376/#388 review round: post-condition truth, idempotence, one 2026-08-13 18:10:07 +02:00
Spells Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
Streaming fix(audio): portal cues fire on the sequencer's sound events, not the tunnel visuals 2026-08-09 08:22:48 +02:00
UI fix(chargen): Campaign CC gate round 1 Batch A — GF-15 input, GF-5 skills rows, GF-13 GM toggles 2026-08-16 10:54:41 +02:00
Update feat(audio): Campaign A slice A5 — retail's region ambient soundscape 2026-08-08 22:53:41 +02:00
World feat(audio): Campaign A slice A4 — the interface sound bus 2026-08-08 22:22:09 +02:00
AcDream.App.csproj fix(platform): Campaign LA LA0 review fixes — CI Linux lanes, arch doc, self-guard 2026-08-14 15:30:04 +02:00
GlobalUsings.cs feat(runtime): share chat commands and run login sequence 2026-08-14 20:27:45 +02:00
Program.cs fix(plugins): close LA5 host lifecycle review 2026-08-14 19:05:13 +02:00
RuntimeOptions.cs feat(app): Campaign CC slice CC4 — chargen screen shell + Heritage/Profession/Skills/Town pages 2026-08-15 17:45:51 +02:00