XGameSave: the documented errors for a full disk and a small read buffer #429
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/429"
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 Marvisak/VIctory. Originally posted by marquezinii on 2026-11-24T03:15:51Z.
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
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T05:14:14Z.
Review: APPROVED
Tested
f0ee35eon Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (265 passed, 0 failed).no_roomagainst the oldremaining(root) + replaced:QUOTA.saturating_sub(used) + replacedstill credits replaced blobs.commitwrites the new version beforeremove_dir_allof the old one, so the disk briefly holds both.QUOTA_EXCEEDED.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).
Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:33:48Z.
Verified
f0ee35eon Arch Linux x86_64 with the Windows build under Wine 11.22 (cargo xwin,x86_64-pc-windows-msvc, release, rustc 1.98.1):victory-hle: 86 passed, 1 failed. The only failure ismodules::net::tests::only_loopback_is_reachable— the known WineWSAConnectByListenvironment gap (#217), unrelated.a_full_disk_is_not_the_quotapasses.Not covered: a genuinely full host disk (the test uses the quota path) and title behaviour (no game data here).