dstorage: retry raw file read on ERROR_INVALID_USER_BUFFER #50
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by jmal423 on 2026-11-25T13:01:36Z.
Fixes 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.Imported from Belobug/VIctory-Belobug-AMD. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T13:01:51Z.
Review: COMMENTED
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.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-26T15:35:56Z.
Review: COMMENTED
AI-assisted review; I inspected the retry path and the PR test changes. I did not run the tests or game.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-26T15:35:56Z.
Code review location:
crates/victory-hle/src/modules/dstorage.rs; line 950Could 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.