feat(crash): the crash window, --crash <folder> #46
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!46
Loading…
Reference in a new issue
No description provided.
Delete branch "gab9281/LongshotLauncher:feat/crash-window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After a crash, Longshot should show the player the crash report and send it only when they say so. The windows that did this in Longshot #141 lived in the builders, which main has removed (#171, #181). The game already starts its folder's
builder=, which is this launcher, so the window moves here.What changed
--crash <folder>(Core/CommandLine.cs,App/Program.cs,App/App.axaml.cs): only the crash window opens. There is no instance lock, so it runs beside an open launcher, and no update check. A crash whose window never opened (the launcher moved, or the game was killed first) is offered at the launcher's next start, over its window.Core/CrashReports.cs: the report itself stays in Longshot, innx2/crash_report.py(its fields, the redaction, the limits, the send). It runs with the folder's version's Python, or else the newest installed tools that have the script:--windowreturns what to show, as one line of JSON, and sends nothing;--send --json --time <t>runs after Send Help. It is a process of its own, so the window can close during a slow send and the send still finishes. The report is kept unless it was sent or refused.longshot_crash.iniin the folder, as the script reads it.App/CrashWindow.cs: the window, built in code likeSetupWindows. It has the report's rows, a Show for the settings and the log, Send Help / I am sorry, the Sent page with the link to the report's comment, and the two beans (App/Assets/crash-bean.png,magicbean-report-sent.png, Magic Bean's own art).--crashin the command-line table.Testing
Tested (CachyOS, KDE Wayland and XWayland, .NET 10.0.114):
dotnet build LongshotLauncher.slnx -c Release -p:RestoreLockedMode=true: 0 errors. The one warning (TextBox.Watermark) is on main too.tests/test_launcher_core.py --strict --longshot <Longshot checkout>: 704 checks passed, 30 of them new (tests/launcher_core/CrashChecks.cs). They cover--crash, which tools read the report, the two commands and their answers, the marker, and the tick.tests/test_release.py: OK.builder=is this launcher (RTX 3060 Laptop, NVIDIA 620.70.06, CachyOS, KDE Wayland).kill -SEGVat 25 s had--crashrunning 0.11 s later, with no signal blocked and none of the game's files open, and the window showed the real report (Longshot #141's screenshot).--crashon a made-up game folder (the crash log from Longshot's tests), with tools whosenx2/crash_report.pyis #141's: the window reads and shows the report (screenshot). The send command, run as the window runs it against a stand-in relay on 127.0.0.1, posted the report and dropped the marker.Not tested:
Needs other testers:
Screenshots
This PR @
a0873ef1,--crashon a made-up crash (nothing on main:--crashis ignored there and opens the launcher):Review
A
/code-review(high) found 10 things, all fixed inff11da5:crash_window.lock): a second--crash, or the launcher's start, leaves a crash that has a window alone, so one report can't be sent twice.--windowanswered with one. It goes on to the next build otherwise.--crashbuilds only the toolchains.GamePlay.Environment.--crash /a --launch /bkeeps/a.Since then,
86f79d2: the window shows the script's reason when the report can't be made.Depends on
MagicBeanDev/Longshot#141 (
--windowand--send --jsoninnx2/crash_report.py, and the game starting--crash). Until a builder carries it, the window says "This build's tools can't read crash reports yet" and the crash stays in the log.🤖 Generated with Claude Code
https://claude.ai/code/session_015KgSKoUqUvce5UXG89NBgi
crash_report.py --window answers {"crash": false, "error": ...} when the report can't be made (Longshot #141's review); the window shows that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015KgSKoUqUvce5UXG89NBgiWIP: feat(crash): the crash window, --crash <folder>to feat(crash): the crash window, --crash <folder>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.