XGameSave: GetContainerInfo of a container with no saved data succeeds #1192
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1192
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@emirduran707 on GitHub · 2026-11-24 13:03 UTC · original
emirduran707:gamesave-container-info-missing→main· +109 −25 · 1 files · 1 commits · openXGameSaveGetContainerInforeturned0x80830010for 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.@DavidM1911 on GitHub · 2026-11-24 13:23 UTC · original
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.
@kacper-serewis on GitHub · 2026-11-24 20:21 UTC · original
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.
@emirduran707 on GitHub · 2026-11-24 21:21 UTC · original
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.
@thehollowedone on GitHub · 2026-11-24 13:14 UTC · original · edited 2026-11-24 21:31 UTC
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.
@DavidM1911 on GitHub · 2026-11-26 03:52 UTC · original
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
@fromthemoonx on GitHub · 2026-11-24 13:54 UTC · original · edited 2026-11-26 04:12 UTC
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
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
@futurepro62 on GitHub · 2026-11-26 08:55 UTC · original
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
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.