WIP: fix(menu): a bug report whose report.txt could not be written out is not shown as saved #1170
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1170
Loading…
Reference in a new issue
No description provided.
Delete branch "TrashPanda/Longshot:fix/bug-report-save-errors"
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: fix · Risk: low · Tested on: Linux, RTX 4070 Ti (game-free checks) · Needs: none
Why
On a full disk, "Report a bug" showed the report as saved while its report.txt was cut short or empty: the write only filled a buffer, and the close that failed was not checked.
Restored from Hookshot 2948, by jarynclouatre, and split out of #286 so it can be reviewed and merged on its own.
How to reproduce
Seen on: Linux (a full disk, or report.txt pointed at /dev/full)
Settings and switches: defaults
Steps: save a bug report from the Insert menu
Expected: the menu says it could not be written
Actual: the menu says it was saved
What changed
bug_report::writeingpu/vk/vk_bug_report.cppcounts a failedfcloseas a failed write, so the report ends with the existing "report.txt could not be written" reason.Commits, each with its original author and message:
656f4a16fix(menu): a bug report whose report.txt could not be written out is not shown as saved (jarynclouatre)"Report a bug" in the Insert menu checked report.txt's write by
fwrite's count only and droppedfclose's result. On a full disk thewrite only fills the stream's buffer and succeeds; the close is what
fails. The menu then showed the report as saved, and the folder held a
cut or empty report.txt.
bug_report::writeingpu/vk/vk_bug_report.cppcounts a failedfcloseas a failed write, so the report ends with the existing"report.txt could not be written" reason.
tests/test_bug_report.py, new case (Linux, where/dev/fullexists): the driver points the report folder's report.txt at
/dev/fullbefore it is written; the report is not shown as saved and the log gives
the reason. It fails on main (the report shows as saved) and passes
here.
(
test_bake_portability:zstandardis not installed on this machine;it fails the same on main).
Restored-from: https://github.com/NotRexed/Hookshot/pull/2948
Measurements
Verdict: nothing to measure: a correctness fix off the frame path, covered by game-free checks.
Flags and settings
None.
Testing
Tested: On Linux (kernel 7.0), RTX 4070 Ti,
main@71b1edd8, this PR @656f4a16:tests/test_bug_report.pypass. The full suite (tests/run_all.py) has not been run on this branch yet; a comment will follow when it has.Not tested: A full disk in the game; Windows. Opened as work in progress until it runs in the game.
Must be tested:
Risks
What could break: the bug report's save.
Turning it off: revert the commit.
Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.third_party/untouched (a new folder with aPROVENANCE.mdinstead).python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).When it applies
mainand passing here.Tested in game: Linux (Ubuntu 26.04.1, kernel 7.0.0-43), RTX 4070 Ti 12 GB, NVIDIA 595.99.02, Ryzen 7 9800X3D: this branch built together with the other 18 split from #218 and #284-#288, merged onto main @
71b1edd8(make_game.py --update, build v3.0.0-rc.5-82-g5952bb3d), then played by a scripted tour through the control bridge (scripts/memtour.py: a save loaded, Zora's Domain, the Market, Hyrule Field and Death Mountain Trail, 40 s each with walking and camera swings). All 4 stops reached, a clean quit, and no device loss or Vulkan error in the log. No bug report was saved in this run, so the changed save path did not run; the check covers a report.txt that cannot be written.Possibly related, for context:
Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.