fix: preserve bounced read failures #3658
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3658
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3658"
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?
@igorevv on GitHub · 2026-11-30 03:07 UTC · original
igorevv:fix/bounced-read-error→main· +31 −9 · 3 files · 7 commits · openfix: preserve bounced read failures
Branch:
fix/bounced-read-errorCommit:
449f248dSummary
Prevent
VICTORY_READ_BOUNCE=1from reporting success when a host read fails after one or more chunks have already been read.Problem
bounced_read()processes large requests in 8 MiB chunks. When a later chunk failed after earlier chunks had succeeded, the function took this path:total > 0caused abreakinstead of an immediate error return.OVERLAPPED.Internalwas set to zero.1, indicating success.A network, device, or file-system error could therefore turn into a successful truncated read. The title could then consume incomplete shader or package data without seeing the underlying failure.
Fix
The function now records the error captured from the failed host call.
After writing the partial byte count, it:
OVERLAPPED.Internal;SetLastError;0to report failure.Partial bytes remain visible to the caller, but they no longer make the request appear successful. Errors on the first chunk retain their previous behavior, and successful or EOF reads are unchanged.
Changed files
crates/victory-hle/src/modules/files.rsOVERLAPPEDandGetLastError;Validation
The test suite was run with
TEMPandTMPpointing to a writable directory onD:.A broader HLE Clippy run still reports pre-existing warnings in unchanged code, including
gameinput.rs:960,1006andvictory-loader/src/crash.rs:804. No fault-injection test with a physical failing device or a game run was performed.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.