feat(scripts): crash_groups.py lists the crash reports in named groups, the largest first #1288
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1288
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:feat/crash-groups"
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?
Type: feat · Risk: low · Tested on: Linux (a script; the game doesn't run it) · Needs: none
Why
55 open issues are titled "Longshot closed unexpectedly", and nothing says which of them are the same crash. Each one is read by hand, so we can't tell which crash to fix first or whether a fix reached the players who reported it. This is the first milestone (M0) of the renderer rework plan: every open crash report in a named group. See #81 (crash reports grouped by a signature) and #44.
What changed
python -I scripts/crash_groups.pyreads the issues the crash window titled, their attached crash and unclean-end records, and the ends of their logs, and prints the reports in named groups, the largest first. It sends nothing.scripts/crash_groups.py: a group's name is how the run ended (the record's reason and exception code, or the log's device lost or GPU hang), whose code the fault was in (the graphics driver, the renderer, the game's lifted code, a system library) and whether VRAM or Windows' commit was at its limit. None of the three changes between builds. Inside a group, reports sharing a build and module+offset are listed together; a fault in lifted code is listed by the game's own address of its caller, which is the same in every build.--markdownand--jsonfor pasting and for other tools;--filesgroups local records and logs with no forge. Of a log over 2 MiB it fetches the first 64 KiB and the last 1 MiB.tests/test_crash_groups.py: the group names for each kind of record and log end, that a name holds across builds, a device lost counted as that after an unclean end, an uncaught C++ exception at the commit limit counted as memory (as #1056 does), and that the driver modules arehos_crash_driver_module's (host/hos_crash_dialog.h).docs/workflow.md: the script, besidehardware_report.py.Measurements
Verdict: nothing to time (a script). Run on the 55 open crash reports on 2026-11-16, it puts them in 16 groups. Half are a lost GPU device (27 reports, 11 of them on Intel cards), 10 are access violations in the game's lifted code (two share a caller), and 9 ended at a memory limit: 6 with no crash record and VRAM or Windows' commit at its limit, 3 as an out-of-memory exception.
Flags and settings
None
Testing
Tested: the script run against the forge's open issues on Linux, 2026-11-16 (the table above). Each of the 55 reports lands in a group; for two of them the group is "nothing in the report says how it ended".
Not tested:
tests/test_crash_groups.pywas not run on this PC (no checks are run here); the forge's checks run it.--fileson a Windows path.Must be tested:
Risks
What could break: nothing in the game. A group name can hold two different crashes that end the same way: every device lost is one group until the fault info in the logs is read too.
Turning it off: revert the commit
Compatibility: Nothing changes
Issues
See #81
See #44
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). Not run on this PC; left to the forge's checks.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
Possibly related, for context:
WIP: feat(scripts): crash_groups.py lists the crash reports in named groups, the largest firstto feat(scripts): crash_groups.py lists the crash reports in named groups, the largest first