XGameSave: GetContainerInfo of a container with no saved data succeeds #1183
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1192"
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 ivall/xcl. Originally posted by emirduran707 on 2026-11-24T13:03:37Z.
XGameSaveGetContainerInforeturned0x80830010for a container that has no saved data: a name never used (a title's first launch), or a container created but never submitted. That code is not "container not found". Microsoft's own code names itE_GS_USER_QUIT:PFGameSaveFilesAPIProvider_GRTS.cppin PlayFab/PlayFabCSdk, andHResult.csin microsoft/XBOX-GDK-dotnet. It is the result of the "quit game" choice on the device-contention dialog. The documentedE_GS_*codes before it run from0x80830001to0x8083000F, and none of them means "not found".The function's documentation lists no not-found error; the name "will return only one result if found". Microsoft's .NET wrapper (
GameSaveProvider.GetContainerInfo) fails only on a failed HRESULT, and reports "not found" itself when the call succeeded and the callback was not called. So a title asking for its save slot on first launch was told the user chose to quit the game.Now a valid name returns
S_OK, and the callback is called only if the container exists. An empty or over-long name returnsE_GS_INVALID_CONTAINER_NAME, the same check and error asXGameSaveCreateContainerandXGameSaveDeleteContainer. The wrong constant is removed; nothing else used it. Storage I/O errors when listing the provider root or a container'sbdirectory (for example, when either is not a directory) returnE_FAILinstead of being silently treated as "no saved data".What is in it
crates/xcl/src/hle/xgameruntime/gamesave.rs:try_blobs_ofandeach_containerpropagate non-NotFoundI/O errors asE_FAILthroughXGameSaveGetContainerInfo,XGameSaveEnumerateContainerInfo, andXGameSaveEnumerateContainerInfoByName.get_container_info_of_a_container_without_saved_data_succeeds_without_a_resultandget_container_info_reports_storage_errors.containers_blobs_round_trip, the assertion after deleting a container now expectsS_OKand no callback. Before, it asserted the wrong code.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4one41e105(rebased ontomain1a0bbe3): 1250 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmain1a0bbe3on this GPU (seeds 722 and 1599).cargo test -p xcl --lib gamesave -- --test-threads=4: 12 passed, 0 failedget_container_info_reports_storage_errorsfailed on0e4fefe(left: 0,right: -2147467259); passes on5c3aacaRegression run
main:
this PR:
Not tested
XGameSaveCreateContainer.AI use
main1a0bbe3(a conflict in the tests ofcrates/xcl/src/hle/xgameruntime/gamesave.rs; both tests kept) and reran the suite and smoke runs above.Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T13:14:07Z.
Independent first-launch check using XCL’s bundled test title with a scratch save-flow fixture. Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, release. I built with
cargo build --offline --locked --release --workspaceand launched a separate process for each case withxcl run <test-title> -- --save-probe=<write|read>.47efa2e, the title’s first query returned0x80830010with zero callbacks. The fixture stopped before saving.0e4fefe, the same first query returnedS_OKwith zero callbacks. The title then submitted one synthetic blob and exited successfully.S_OKand invoked the callback once. The reported blob count, byte count, and read-back payload all matched.This exercised the title’s named XGameRuntime imports and on-disk persistence across processes. Retail save behavior was outside the test.
AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the fixture and drafted this report.
Retest on
5c3aacadI checked both enumeration APIs with synthetic save files. A provider root that was a file returned
E_FAILwith zero callbacks on both APIs. In a two-slot provider, an exact prefix for the damaged slot also returnedE_FAILwith zero callbacks. An unmatched prefix returnedS_OKwith zero callbacks, and the case-insensitive prefix for the healthy slot returned its correct name, blob count and size.When the callback continued past the healthy slot, both an unfiltered scan and a prefix covering both slots reported the healthy result first and then returned
E_FAIL. Stopping after the healthy callback returnedS_OK. After restoring the damaged slot's synthetic blob directory, both slots enumerated and the healthy blob still contained its original bytes.Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC debug.
cargo test --offline --locked -p xcl --lib <filter> -- --nocapture --test-threads=1passed 12/12 for the stockgamesavetests and 1/1 for the addedscratch_enumeration_distinguishes_damaged_savesfixture, with zero skips. Using the prior save implementation made the same fixture fail because enumeration returnedS_OKfor the file at the provider root. No retail saves were used.AI-assisted. Codex (GPT-6 family, exact variant unavailable) wrote and ran the fixture and drafted this update.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:23:34Z.
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.
cargo test -p xcl --lib gamesave: 11 passed, 0 failed — includes the newget_container_info_of_a_container_without_saved_data_succeeds_without_a_result.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T13:54:53Z.
Rerun on the new head
e41e105(storage errors now reported): still passes on the RTX 3060, and the newget_container_info_reports_storage_errorscatches the old "every error is no data" handling.cargo test --workspace --no-fail-fast -- --test-threads=4,e41e105merged ontomainb49be18(clean)SKIPPEDlinesget_container_info_of_a_container_without_saved_data_succeeds_without_a_resultandget_container_info_reports_storage_errors, alone, 30 runs eachhle::xgameruntime::gamesave::(13 tests),--test-threads=8, 30 runsErr(e) if e.kind() == ErrorKind::NotFoundarms widened toErr(_)get_container_info_reports_storage_errorsfails; the other 12 passSame machine, debug. The reports below are for
0e4fefe.Whole-suite run, to go with the two runs above (
gamesavetests and the test title's save probe).Tested
stable-x86_64-pc-windows-msvc; debug0e4fefea67daae000e20fa6de7254c041009356a(on its base47efa2e):cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignoredmain930e8b4(no conflict): 752 passed, 0 failed, 41 ignoredgamesave.rsas onmainplus onlyget_container_info_of_a_container_without_saved_data_succeeds_without_a_result, it fails withleft: -2138898416, right: 0. That is0x80830010(E_GS_USER_QUIT), the code the description is about.gamesavetests, 10 runs: 10 of 10 passed (11 each)gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
AI use
Imported from ivall/xcl. Originally posted by kacper-serewis on 2026-11-24T20:21:17Z.
On
0e4fefea storage error is reported as "no saved data":S_OKwith the callback not called.Tested: Windows 11, debug, CPU only. Both cases return
(S_OK, 0 callbacks):bis a file, so its blobs cannot be listedeach_containerdrops the errors. Before, both gave 0x80830010 like a missing container (read from the code, not run); now a title could take them for a first launch. Suggested: leteach_containerreturn the error, e.g.E_FAIL, and return it fromXGameSaveGetContainerInfo.Test (append to gamesave.rs)
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment. I checked the points before posting.
Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T21:21:16Z.
Fixed in
5c3aaca(squashed and force-pushed).try_blobs_ofandeach_containernow treat onlyErrorKind::NotFoundas absent data and returnE_FAILon other I/O errors (such as a provider root or containerbpath that is a file), propagating it fromXGameSaveGetContainerInfo,XGameSaveEnumerateContainerInfo, andXGameSaveEnumerateContainerInfoByName.Reproduced both cases with
get_container_info_reports_storage_errors(returnedS_OK/0instead ofE_FAILon0e4fefe); on5c3aacacargo test -p xcl --lib gamesavepasses 12/12 and the full workspace suite passes (743 passed, 0 failed, 41 ignored).AI use: Antigravity with Gemini 4 Neon wrote the fix, test, and this reply.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:52:40Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T08:55:45Z.
NVIDIA and AMD full-suite run, to go with the reports above by fromthemoonx, since none of them covers AMD. Tested exact head
e41e1054(on its base1a0bbe3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1240 passed, 0 failed, 44 ignored. SKIPPED (no wave64, no xgameruntime.dll):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,test_title_draws_with_a_root_signature_under_the_debug_layer,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.get_container_info_of_a_container_without_saved_data_succeeds_without_a_result,get_container_info_reports_storage_errors.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1251 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),test_title_draws_with_a_root_signature_under_the_debug_layer(no xgameruntime.dll).--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T07:07:27Z.
merge-check claim
head:
e41e10546fImported from ivall/xcl. Originally posted by throny on 2026-11-28T07:18:18Z.
merge-check
base:
e429936chead:
e41e10546fmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2128 passed, 9 failed, 48 ignored (26 SKIPPED lines). The 9 failures are main's own at
e429936con this GPU (reported on #3041: they arrive with the merge of #2959); base alone: 2126 passed, 9 failed, 48 ignored.review: no blocking finding. No path is built from the title's container name: the root is listed and decoded names are compared, and the new length check (1 to 256 bytes) matches CreateContainer's. The removed error constant has no other users. Not blocking: a container folder that answers access-denied (for instance one pending deletion) now fails the whole enumeration where it was skipped before. Not verified: that the console returns success for a missing container. The tests remove only their own per-process folders under the temp directory.
performance: none (save API only).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T01:25:59Z.
merge-check claim
head:
e41e10546fImported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T01:33:06Z.
merge-check
base:
53e85fb124head:
e41e10546fmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2794 passed, 1 failed, 49 ignored; SKIPPED: 30 (22 no wave64, 3 per-lane #1426 refused, 2 no heap windows, 2 no xgameruntime.dll, 1 cannot disable the driver cache 0x887A002D); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (also fails on base
53e85fb1alone)review: none (read the full +109/-25 diff in crates/xcl/src/hle/xgameruntime/gamesave.rs: removes the misnamed E_GS_CONTAINER_NOT_FOUND (0x80830010 = E_GS_USER_QUIT), returns S_OK without invoking the callback when a valid container has no saved data, validates name length with E_GS_INVALID_CONTAINER_NAME, propagates non-NotFound I/O errors as E_FAIL across GetContainerInfo/EnumerateContainerInfo/EnumerateContainerInfoByName, and adds regression tests; no duplicates found in open/merged PRs or #1607; not tested: retail title first-launch save flow and >256-byte container name behavior on real console)
performance: none (no hot-path work added; only directory error propagation on container/blob enumeration)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4070 SUPER (32.0.16.2140), AMD Ryzen 7 7800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Antigravity (Gemini 4 Hydrogen)