XUser: finding an unknown local id fails with ERROR_NOT_FOUND #2071
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2073"
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 0xkn0wh3r3 on 2026-11-25T04:22:59Z.
The problem
A title that looks up a local id with no user gets the wrong error code back.
XUserFindUserByLocalIddocumentsHRESULT_FROM_WIN32(ERROR_NOT_FOUND)(0x80070490) for a local id with no user. VIctory'sfind_by_local_idreturned the XUser errorE_GAMEUSER_USER_NOT_FOUND(0x89245104,USER_NOT_FOUND) instead, through the sharedfoundhelper.Found by the conformance title in #2057, which lists this check as a known divergence.
The fix
find_by_local_idreturns the newNOT_FOUND(0x80070490) for an unknown local id, and the user's handle for the known one as before.XUserFindUserByIdnames no specific error, so it keeps the XUser one (USER_NOT_FOUND).Testing
modules::xuser::tests::an_unknown_local_id_is_not_found: the known local id finds the user; an unknown one returnsNOT_FOUNDand leaves the handle null;XUserFindUserByIdwith an unknown id still returnsUSER_NOT_FOUND.cargo test -p victory-hle: all pass.cargo clippy -p victory-hle --all-targets: clean.Related
#2057 lists this check on its test's
KNOWNlist. Whichever of the two merges second takes the entry off that list (a listed check that passes fails that test).Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:26:30Z.
Review: COMMENTED
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
Unknown local id → ERROR_NOT_FOUND — XUser lookup error-code fix; pair with #2072 (same subsystem).
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T04:44:51Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-hle --lib xuser::— 3 passed, 0 failed (includingan_unknown_local_id_is_not_found)cargo clippy -p victory-hle --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean fix returning
ERROR_NOT_FOUNDfor unknown local user IDs with unit test coverage. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:27:43Z.
Automated triage for the maintainers.
find_by_local_idincrates/victory-hle/src/modules/xuser.rsnow returnsHRESULT_FROM_WIN32(ERROR_NOT_FOUND)(0x80070490) for an unknown local id, which the PR cites from the publicXUserFindUserByLocalIdreference. Before, the sharedfoundhelper returnedUSER_NOT_FOUND.find_by_idkeepsUSER_NOT_FOUND. The test covers the known id, an unknown id (the handle stays null) and the unchanged by-id path. The change is small and follows the repo rules.CI: no check runs have been reported for this head. Whichever of this PR and #2057 merges second must drop the entry from #2057's
KNOWNlist.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:05:44Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because the console runtime does not return that code. The public page lists
HRESULT_FROM_WIN32(ERROR_NOT_FOUND), but on a console both find functions return0x89245104when no user matches, which is whatmainreturns. The title's only caller ignores the HRESULT in any case.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed