Repository navigation
XGameSave: the documented errors for a full disk and a small read buffer - #429
Merged
Marvisak merged 2 commits intoNov 24, 2026
Merged
Conversation
…TOO_SMALL XGameSaveReadBlobDataResult lists E_GS_PROVIDED_BUFFER_TOO_SMALL among its errors, and the synchronous read already returns it; the result passed on XAsyncGetResult's E_NOT_SUFFICIENT_BUFFER instead.
An update that fit the user's 256 MB quota but not the host disk failed with E_GS_QUOTA_EXCEEDED, which tells the player to delete saves. The documentation keeps the two apart: E_GS_OUT_OF_LOCAL_STORAGE is the device out of room and can come before the quota is reached. The disk check also no longer credits the blobs an update replaces, since the new version is written before the old one is removed.
edsuuu
referenced
this pull request
in edsuuu/VI-BR-PORT
Nov 24, 2026
… small read buffer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verified
Not covered: a genuinely full host disk (the test uses the quota path) and title behaviour (no game data here). |
mercuryVM
approved these changes
Nov 24, 2026
mercuryVM
left a comment
There was a problem hiding this comment.
Tested f0ee35e on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed).
- Checking
no_roomagainst the oldremaining(root) + replaced:- The quota path is unchanged.
QUOTA.saturating_sub(used) + replacedstill credits replaced blobs. - The disk path no longer credits them. That is right, since
commitwrites the new version beforeremove_dir_allof the old one, so the disk briefly holds both. - The quota is checked first, so a title over both limits still sees
QUOTA_EXCEEDED.
- The quota path is unchanged.
read_resultmaps onlyE_NOT_SUFFICIENT_BUFFERtoBUFFER_TOO_SMALLand passes other failures through unchanged. The extended async test confirms that a retry with the right size still reads the result.
No issues found.
AI-assisted (Claude Code).
mercuryVM
added a commit
to mercuryVM/VIctory
that referenced
this pull request
Nov 24, 2026
…a full disk and a small read buffer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
suirentakamura
pushed a commit
to suirentakamura/VIctory
that referenced
this pull request
Nov 24, 2026
…nted-errors XGameSave: the documented errors for a full disk and a small read buffer
itsonlysimbo
pushed a commit
to itsonlysimbo/VIctory
that referenced
this pull request
Nov 24, 2026
…nted-errors XGameSave: the documented errors for a full disk and a small read buffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two XGameSave results that differ from the documented error codes, one commit each:
A full host disk.
Update::submitcompared the update withmin(quota left, disk free)and returnedE_GS_QUOTA_EXCEEDEDwhen it did not fit. The game saves errors page keeps the two apart:E_GS_OUT_OF_LOCAL_STORAGEis "the device has run out of room for save games [...] even if the game's per user storage quota has not been exceeded", whileE_GS_QUOTA_EXCEEDEDis the 256 MB per-user quota. A game shows different UI for each (delete saves vs free space on the device). The check is now a smallno_roomfunction: quota first, then the disk. The disk check no longer credits the bytes of replaced blobs, sincecommitwrites the new version before it removes the old one.GetRemainingQuotais unchanged.A small buffer for an async read result.
XGameSaveReadBlobDataResultpassed onXAsyncGetResult'sE_NOT_SUFFICIENT_BUFFER. The function's errors includeE_GS_PROVIDED_BUFFER_TOO_SMALL, which the synchronous read here already returns. The result stays in place, so a retry with a larger buffer still works (the test does that).Tests:
no_roomgets a unit test for each case (disk short, quota short, a replacement that fits a full quota); the existing async read test first asks with an 8-byte buffer (before: 0x8007007A, now 0x80830007), then reads normally.cargo test -p victory-hlepasses, including the kill-at-any-step test, and clippy reports nothing new.https://learn.microsoft.com/gaming/gdk/docs/features/common/game-save/game-saves-errors
https://learn.microsoft.com/gaming/gdk/docs/reference/system/xgamesave/functions/xgamesavereadblobdataresult