dstorage: retry raw file read on ERROR_INVALID_USER_BUFFER #50
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!50
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-50"
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?
@jmal423 on GitHub · 2026-11-25 13:01 UTC · original
jmal423:pr/dstorage-raw-read-retry→main· +12 −0 · 1 files · 1 commits · openFixes intermittent
ERROR_INVALID_USER_BUFFER(Win32 error 1784) during DirectStorage raw file reads (request.options == 0) on Windows when reading directly into guest/pinned memory buffers.read_intovia a temporary heap buffer onERROR_INVALID_USER_BUFFERand copies the result into the destination slice.Tested on Windows 11 / AMD Radeon RX 9070 XT:
cargo test -p victory-hle: 103 passed, 0 failed, 1 ignoreddstorage1784 failures, 0 crashes.@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 13:01 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@gut0to on GitHub · 2026-11-26 15:35 UTC · original · reviewed
AI-assisted review; I inspected the retry path and the PR test changes. I did not run the tests or game.
@ -943,1 +947,4 @@Ok(n) => done += n,// Retry only the raw file-to-title path on ERROR_INVALID_USER_BUFFER.// Keep any bytes already read and report the original error on exhaustion.Err(error) if request.options == 0 && error.raw_os_error() == Some(1784) && retries < 3 => {@gut0to on GitHub · 2026-11-26 15:35 UTC · original
Could a deterministic regression exercise a partial
seek_read, then Win32 1784, then a successful retry? It would protect the key invariant here: the retry starts atrequest.offset + done, preserves the bytes already read, and only retries the remaining slice. A retry-exhaustion case would also pin down the final error behavior.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.