fix(libkernel): read defaultLanguage from localizedParameters #710
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/710"
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 boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T17:31:54Z.
What
A PS5
param.jsonkeepsdefaultLanguageinsidelocalizedParameters, next to the language entries:parseParamJsonlooked fordefaultLanguageat the root only, then fell back toen-USand to the first member oflocalizedParameters. Without anen-USentry the first member is thedefaultLanguagestring, and the next lookup threwexpected JSON object in param.json, which stops presentation ([videoout] presentation failed).defaultLanguageis read fromlocalizedParametersfirst, then from the root as before.localizedParameterswithout one throwsparam.json localizedParameters has no language entry.param_json_parser(from #661): new language cases — nesteddefaultLanguagewith CRLF line endings and onlyen-GB, nested selection overen-US, fallback toen-US, the root-leveldefaultLanguage, and no language entry. With the parser change reverted the test fails withexpected JSON object in param.json.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT.
ctest(rebased on2707b3a3): 315/317 passed, includingparam_json_parser.agc_driver_lds_atomics64andagc_driver_vopc_compare_tablefail on this machine onmainas well (Vulkan device tests).localizedParametersholdsdefaultLanguageanden-GBonly) with #698, #699, #700, #702, #705, #709, #648: the window title is read and the title continues to the Vulkan device and swapchain.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T19:45:51Z.
Thanks, the parser change looks right to me.
defaultLanguageis now read fromlocalizedParametersfirst and from the root as before, the last fallback skips non-object members, and alocalizedParameterswithout any language object now gives a clear error.Two things about the test, though.
param_json_parsertest aborts (GCC 16, Release, with only this PR merged on main). The four parse cases pass, and the abort comes from the lastRejects(...)case: thestd::runtime_errorfromparseParamJsonis never caught, and the process aborts in_Unwind_RaiseException_Phase2, reached through_Unwind_Resumeinmain. None of these changed it: dropping theRemoveguard, catchingstd::exceptioninstead, or linkinglibkerneland using its copy of the parser instead of compilingParamJsonParser.cppinto the test. #661's test catches exceptions from the same parser on Linux without trouble, so its setup may be the easier one to follow. The CI hasn't run on this PR yet, which is why it didn't show up there.core/libs/tests/ParamJsonParser.cppand aparam_json_parser_tests/param_json_parsertarget too, in another place incore/libs/prx/libkernel/CMakeLists.txt. Git reports an add/add conflict on the test file. The two CMake blocks merge without a conflict, but together they define the same target twice, so CMake fails to configure. #661 has since landed, so could you rebase onto it, add your cases to its test file and drop your CMake block?On PPSA21564: its
param.jsonkeepsdefaultLanguageinsidelocalizedParameterstoo, but it'sen-USand there's anen-USentry, so main already picks the same title.Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T20:52:40Z.
Thanks for testing it on Linux. Rebased onto #661 and reworked the test as suggested:
ParamJsonParser.cpp(itsRequire/trystructure, one shared temp file), and the PR now only touches the parser and that test file;libkernel/libc,configure_windows_unwind), which you saw catching exceptions from the parser on Linux. I could not reproduce the abort here (Windows only), so a Linux run would be appreciated.With the parser change reverted the test now fails cleanly with
expected JSON object in param.json; with it,ctest315/317 (the twoagc_driverVulkan tests that fail on this machine onmaintoo).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T22:57:00Z.
Thanks for reworking it. I ran it on Linux at
9489b85(GCC 16, Release, with only this PR merged on main):param_json_parserpasses, 20 of 20 repeats, so the abort I saw is gone with #661's setup.With only the new test lines applied to main's parser, it fails with
expected JSON object in param.json, as you describe, so the test covers the change. The parser change itself still looks right to me, and the PR now only touches the parser and #661's test file.