Repository navigation
fix(libScePlayGo): report missing chunk metadata - #5494
adriadam10 merged 1 commit into
Conversation
CnRJay
left a comment
There was a problem hiding this comment.
The description is clear about the trade-off, but this is the kind of change upstream has turned down. An environment switch that makes PlayGo answer "installed" for chunk IDs the package doesn't describe is an approximation: with it on, the answers no longer correspond to the package, and titles that enumerate until the first rejected ID never stop. Reviewers have asked for approximations, even opt-in or logged ones, to stay on testing branches, and for upstream to either be exact or throw (see the CMASK discussion on #1237).
The underlying case is a dump with no playgo-* files, which means the dump is incomplete rather than the title being unusual. Two exact alternatives:
- make the missing metadata a clear stop (
RejectUnreadablePlayGoFilesis already there) with a message telling the user the dump lackssce_sys/playgo-chunk.dat; - or derive the chunk list from what the package actually contains, if the chunk layout can be recovered from the pkg or the
app0file layout.
Users who need the switch for a particular broken dump can carry it on a fork branch.
|
Thanks for the review. The associated #5487 report now has a title-side A/B: with the opt-in, High on Life asks |
|
Scope matches #5487: the variable is only read when there's no playgo-chunk.dat, no package chunk table and no playgo-scenario.json, and the default stays strict. One thing: other APS5_* switches in core/libs/prx are enabled just by being set (getenv(...) != nullptr, e.g. APS5_NO_TIMELINE, APS5_COARSE_TIMED_WAITS). This one needs exactly "1", so =true or =yes is silently ignored and the user still gets the save error. Either follow the presence convention or reject values other than 0/1 with an error, so a typo doesn't look like the setting doing nothing. Also, with the setting on, scePlayGoGetLocus accepts every id while scePlayGoGetChunkId still returns only chunk 0. USAGE.md mentions it; a line in the debt entry would help too, since a title that cross-checks both will see them disagree. |
|
Thanks for the review. I pushed |
36a4e69 to
a44689c
Compare
|
Thanks for spelling out the upstream constraint. I removed the approximation entirely. With no chunk table or scenario metadata, chunk 0 remains available and a query for any other ID now throws a diagnostic naming both missing metadata files and the queried ID; a complete chunk table still returns BAD_CHUNK_ID for an ID outside that table. I added regression coverage for both cases. The focused Linux GuestPlayGo test executable and convention checks pass; full CMake configure remains unavailable here because SDL2 development files are missing. |
|
Checked the diff, |
|
@adriadam10 @MarcZX100, before this merges: the current head (
I haven't run this head on High on Life; the above is from the diff and the call pattern logged on #5487. If a clear stop is the goal, I'd keep Tested and written by Claude (AI assistant) on a contributor's machine. |
…ithout PlayGo metadata Since boykopovar#5494 a dump with no playgo-chunk.dat and no playgo-scenario.json throws on the first nonzero chunk id. High on Life (PPSA15388) asks scePlayGoGetLocus about ids 0-999 at startup and now aborts on id 1; Sifu (PPSA03001) walks ids until the first error (boykopovar#4491). APS5_PLAYGO_UNLISTED_CHUNKS=installed reports such ids as installed and =absent returns SCE_PLAYGO_ERROR_BAD_CHUNK_ID. Without it the stop stays, and its message now names the setting. Any other value throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ithout PlayGo metadata Since boykopovar#5494 a dump with no playgo-chunk.dat and no playgo-scenario.json throws on the first nonzero chunk id. High on Life (PPSA15388) asks scePlayGoGetLocus about ids 0-999 at startup and now aborts on id 1; Sifu (PPSA03001) walks ids until the first error (boykopovar#4491). APS5_PLAYGO_UNLISTED_CHUNKS=installed reports such ids as installed and =absent returns SCE_PLAYGO_ERROR_BAD_CHUNK_ID. Without it the stop stays, and its message now names the setting. Any other value throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ithout PlayGo metadata Since boykopovar#5494 a dump with no playgo-chunk.dat and no playgo-scenario.json throws on the first nonzero chunk id. High on Life (PPSA15388) asks scePlayGoGetLocus about ids 0-999 at startup and now aborts on id 1; Sifu (PPSA03001) walks ids until the first error (boykopovar#4491). APS5_PLAYGO_UNLISTED_CHUNKS=installed reports such ids as installed and =absent returns SCE_PLAYGO_ERROR_BAD_CHUNK_ID. Without it the stop stays, and its message now names the setting. Any other value throws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
When a package has neither
playgo-chunkdefs.xml,sce_sys/playgo-chunk.dat, norsce_sys/playgo-scenario.json, the dump cannot establish whether nonzero chunk IDs exist. Keep chunk 0 available, but throw a diagnostic naming the missing metadata when a title queries another ID. Complete package tables still returnSCE_PLAYGO_ERROR_BAD_CHUNK_IDfor IDs outside the table. Update the technical-debt note and regression coverage for both paths.This is related to #5487, but it does not make the incomplete High on Life dump load successfully. It gives a clear stop instead of guessing that undocumented chunks are installed.
Tested
Export.cppandGuestPlayGo.cppwith a temporaryResolvePath_nid_no_patchharness and ranguest_playgo_testssuccessfully.python3 tools/check_conventions.py --base upstream/mainpassed.git diff --checkpassed.SDL2Config.cmake).Checklist
main; no duplicate implementation identified