Game: the crash report of a run after a Linux Restart-now says the game logged to no file (the run_id line sits past the 8 KB search window) #1374
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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#1374
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?
Version and channel
Found on current main (
544229a2), reading and reproducing the code paths; also reproduced on parent revisions. Release and nightly alike: any Linux run that restarts through the Insert menu's "Restart now".What happened
A crash report made by the run AFTER a Linux "Restart now" says its log section is "Not found: the game logged to no file", even though the game is writing
logs/longshot_log.txtthe whole time.Mechanism (all three parts verified by running the real code with fixtures, during the review around #1322):
host/hos_relaunch.c:147-158): fd/2 stays the openlongshot_log.txtit inherited, so the restarted run sees stderr as a regular file, skips the log-open block, and keeps appending at the old offset. That part is correct.run_id:line therefore lands at whatever offset the first run reached. The review's probe put it at 33 KB into the file.hos_crash_dialog.c'slog_is_run(line 272-279) searches only the first 8192 bytes of the log forrun_id: <wanted>. Past that window the crash dialog'sfind_run_logrejects the file, and the report's tail section prints "Not found: the game logged to no file". The bug report's long log copy still succeeds (it reads the whole file), so it is the crash report's tail that goes missing.Expected
The restarted run's crash report finds its run's log tail, as a first run's does.
How often
Every time, when the run before the restart wrote more than ~8 KB (any real play session does).
Fix shape
Reader-side is the small fix: stream-search the file for the wanted
run_id:(the same 256 MB capread_logalready uses) instead of the 8192-byte head window. Alternative shape: the relauncher explicitly rotates and reopens an owned log on restart so the new run starts at offset 0 (bigger behavior change: a restart today intentionally continues one file). A regression test needs a first run whose log passes 8 KB, then a restart plus crash record.Reproduced during the review of #1322 with the real gate, relaunch, crash writer, bug-report code and crash helper under fixture stubs; a parent revision with a plain icon start fails the same way, so it is not from #1322 (that PR's only restart interaction is that Gaming-mode runs now also have this log to hit the bug with).
Before you send it
544229a2).Possibly related, for context:
Claiming the reader-side fix: log_is_run will stream-search the log for the wanted run_id line instead of reading only the first 8192 bytes, keeping read_log's existing 256 MB ceiling; a restart regression with a first run whose log passes the old window goes into the crash-dialog driver. The relauncher's inherit-the-open-log behavior stays as it is (continuing one file is deliberate).
Fix in flight: PR #1375 (fix/crash-dialog-log-run-search, head bf57a624). Reader-side shape as claimed: log_is_run streams the file for the wanted run_id line under read_log's existing 256 MB ceiling; the relauncher's inherit-the-open-log behavior stays. The crash-dialog driver now reproduces the whole path (a first run whose log is 24 KB deep, a restart, a crash, the Report-manually clipboard copy checked for the tail), fails on main with this issue's exact text, and mutation-probes the old 8 KB probe back to a fail.