Owner request 2026-10-05 (prevention; example SILENT HILL 2, UE 5.1), and a false crash found on the owner's ledger: The Witcher 3, 2026-10-04, exit code 0, stored crashed by a WER 1001 RADAR_PRE_LEAK_64 (Windows' memory-leak detector) whose P1 named witcher3.exe. E1 - CrashEventMatcher (pure): a 1000 from "Application Error" counts only when its AppName [0] equals the executable's, its AppPath [10] (when given) is the executable's, and its ProcessId [8] (typed) is the session's pid; a 1001 from "Windows Error Reporting" only when EventName [2] is a crash report (APPCRASH, BEX, BEX64, CLR20r3, MoAppCrash, MoBEX) and P1 [5] equals the name. EventLogCrashSource filters by provider in the XPath and asks the matcher; ICrashEventSource.FoundCrash(CrashQuery). Checked once against the owner's real Application log: the Witcher 3 window no longer matches. E2 - CrashReporterWitness, fed by the watcher's 1 s snapshots (CaptureOrchestrator.PollOnceAsync): every on-crash reporter (CrashReporterCatalog: CrashReportClient, CrashReporter, CrashReport, BsSndRpt/BsSndRpt64) with its parent by pid, image and start (a pid reused by a later process is not the parent); always-on handlers (UnityCrashHandler64/32, crashpad_handler) never. SessionRecorder asks at the end (two more polls when the game just left, at most 2.5 s); CrashReporterRule counts it when it started >= 10 s after the game and the game left within 60 s: crashed, notes crash_reporter=<image>; otherwise a note crash_reporter_seen=. Unreal's crash (exit code 3, no event) is crashed now. No process is opened. Formats.ExitText names the reporter (string en/vi/ja). E4 - ExecutableLocator: "bssndrpt" and "bugsplat" are helper fragments (KCD2 picked its game by rank). Privacy Policy 2.7 (section 4): the Application log's crash reports about a tracked game, and the names of programs a tracked game starts (the first was read since P2 and not stated). Tests: CrashEventMatcherTests (the real RADAR record shape, a hang, a name inside another, pid and path ties, typed and hex values), CrashReporterWitnessTests, CrashReporterRuleTests, SessionRecorderTests (exit code 3 + reporter = crashed and named; a game that kept running = note only), ExitStatusMapper, CaptureNotes, ReasonText (ExitText), ExecutableLocator, EventLogCrashSource. Docs: 04_CAPTURE (crash classification corrected in place), 19_SAFETY (crash safety), 06_DATA_MODEL (note slots), LIMITATIONS (When a game crashed), CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
914 B
C#
24 lines
914 B
C#
// SPDX-License-Identifier: GPL-3.0-only
|
|
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
|
|
|
using FluentAssertions;
|
|
using FrameLedger.Infrastructure.Recording;
|
|
|
|
namespace FrameLedger.Infrastructure.Tests.Recording;
|
|
|
|
/// <summary>The real Application log: unprivileged, bounded by the window, and false rather than a throw for a name nobody crashed.</summary>
|
|
public sealed class EventLogCrashSourceTests
|
|
{
|
|
[Fact]
|
|
public void AnExecutableNobodyCrashedInTheLastMinuteIsNotACrash()
|
|
{
|
|
var source = new EventLogCrashSource();
|
|
DateTimeOffset now = DateTimeOffset.UtcNow;
|
|
|
|
string exe = @"C:\Games\fl-nobody-ever-ran-this-" + Guid.NewGuid().ToString("N") + ".exe";
|
|
bool found = source.FoundCrash(new Application.Recording.CrashQuery(exe, 0, now.AddMinutes(-1), now.AddSeconds(30), TargetLeft: true));
|
|
|
|
found.Should().BeFalse();
|
|
}
|
|
}
|