{"record":{"id":"a7f1ac1e020dce40","repo":"stride3d/stride","slug":"test-crash-from-stride-crash-test","errorCode":null,"errorMessage":"Test crash from 'stride crash test'.","messagePattern":"Test crash from 'stride crash test'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"info","filePath":"sources/launcher/Stride.Cli/CrashCommand.cs","lineNumber":114,"sourceCode":"                if (Directory.Exists(path))\n                    return ShowRun(CrashStore.OpenRun(path));\n                if (File.Exists(path))\n                    return ShowFile(path);\n\n                Console.Error.WriteLine($\"No crash report at '{path}'.\");\n                return 1;\n            }\n            catch (Exception exception)\n            {\n                Console.Error.WriteLine($\"Failed to read: {exception.Message}\");\n                return 1;\n            }\n        });\n\n        // test: deliberately throw, so the whole crash pipeline (store, consent prompt, send) can be\n        // exercised end to end without a real bug.\n        var testCommand = new Command(\"test\", \"Throw a test exception to exercise the crash-report pipeline.\") { Hidden = true };\n        testCommand.SetAction(int (ParseResult _) => throw new InvalidOperationException(\"Test crash from 'stride crash test'.\"));\n\n        var crash = new Command(\"crash\", \"List, show and send crash reports saved by Stride's headless tools.\");\n        crash.Subcommands.Add(listCommand);\n        crash.Subcommands.Add(showCommand);\n        crash.Subcommands.Add(sendCommand);\n        crash.Subcommands.Add(testCommand);\n        return crash;\n    }\n\n    // A whole run: print every deduped group it holds.\n    private static int ShowRun(CrashRun run)\n    {\n        var crashes = run.Read();\n        if (crashes.Count == 0)\n        {\n            Console.Error.WriteLine($\"No crashes in '{run.Directory}'.\");\n            return 1;\n        }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/launcher/Stride.Cli/CrashCommand.cs#L96-L132","documentation":"This is a deliberate exception thrown by the hidden `stride crash test` subcommand. It exists solely to exercise the crash-report pipeline (store, consent prompt, send) end to end without a real bug. It is not a malfunction of the library.","triggerScenarios":"Running `stride crash test` on the command line; the hidden test command's action unconditionally throws InvalidOperationException.","commonSituations":"Developers or QA validating crash reporting works in headless tools; someone discovering the hidden command via help/autocomplete and running it unknowingly.","solutions":["No fix required — this crash is intentional; confirm the crash report was stored and the consent/send flow behaved as expected.","If you hit this accidentally, simply do not run `stride crash test`; it is hidden and for pipeline testing only."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await command.InvokeAsync(\"crash test\"); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"Test crash from\")) {\n    // expected: intentional pipeline test crash; assert report stored/sent\n}","preventionTips":["Keep the command hidden so users don't invoke it accidentally.","Use it only in controlled test harnesses that assert on the resulting crash report."],"tags":["cli","test","crash-reporting"],"backgroundTag":"test-crash-injection","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}