feat: crash reports sent from the game to a bot (with consent) #81
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Why
When Longshot crashes, the player has to find the log, open an issue or a Discord message, and paste it by hand. Most
don't, so we only hear about a fraction of crashes, often without the version, the GPU or the backtrace. A bot that
receives a crash report straight from the game would tell us how often each crash happens and on which hardware.
What we already have
On a crash, the handler in
host/mkw_glue.c(report_crash) writes to the log:CRASH: exception <code> (<read|write> <addr>, guest <addr>) at <module>+<offset>CRASH: host backtrace: <module>+<offset> ...(x64 unwind data on Windows,backtrace()on Linux)and
log_crash_filter(host/hos_thread.c) drains the log queue before the process dies. So the summary of a crashis already there; it never leaves the PC.
Proposal
"Longshot closed unexpectedly last time. Send a crash report?" with Send, Don't send and Always send.
Nothing is sent without that consent, and it can be turned off in the settings.
CRASH:lines and the last ~200 lines of the log before thempaths: user names in paths become
<user>.MagicBeanDev/Infra), which:#crash-reportschannel, and counts the rest on the samemessage (versions, GPUs and OSes seen)
crash) once a signature reaches a few reports, linking the Discord message, andcomments on it when a new version still crashes the same way
turn the top frames into function names for the post.
Open questions
only?
Done when
#crash-reportswith its version, hardware andbacktrace, and nothing is sent without consent.
tests/has a check that the report builder leaves out paths and game data (no game needed).Crash: 0xc0000005 (read) at
livetest.exe+0xdeadin0.0.0-livetest8184a6f2e233· seen 3 times · first 2026-11-13 02:39 UTC · last 2026-11-13 02:41 UTC0.0.0-livetest(3)Live test from Bean-Ops (Linux)(2),Live test from Bean-Ops (Windows 11)(1)Vulkan(2),WebGPU(1)Test GPU (not a real crash)(3)First report
0.0.0-livetestLive test from Bean-Ops (Linux)Vulkannone (live test)Test GPU (not a real crash)Test CPUCrash
The log before it