fix(libSceNpTrophy2): accept a null details or data in GetTrophyInfo and GetGroupInfo #3517

Merged
ee6aba54 merged 1 commit from upstream-pr/3517 into main 2026-10-11 21:29:34 +00:00
ee6aba54 commented 2026-10-11 12:09:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ee6aba54 on 2026-10-11T12:09:55Z.


What

sceNpTrophy2GetTrophyInfo and sceNpTrophy2GetGroupInfo rejected a call unless both outputs were given, although both functions already fill each output only when it is not null. PPSA18391 (Clickteam Fusion) queries trophies with a null details; AnyPS5 threw invalid argument there and the title ended. Only a call with neither output is rejected now, the same way #912 handled sceNpTrophy2GetGameInfo.

Tested

  • Ubuntu 24.04, Linux 7.0, GCC 13.3, Release, based on 2220effb. guest_nptrophy2 now covers details only, data only and neither (still throws) for both functions; it aborts without the fix. Full ctest: 830/832. The two failures, agc_driver_emulated_color_compare (the device cannot sample the sRGB image) and guest_kernel_stack_protect, involve no Trophy2 code and fail the same way after a rerun.
  • PPSA18391: with this change the title gets past its trophy query and reaches the title menu. It also needs other changes that are not upstream yet, so this was checked on a build that includes them.
  • Windows not built or tested.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4818943203 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3517). Originally posted by [ee6aba54](https://github.com/ee6aba54) on 2026-10-11T12:09:55Z. --- ### What `sceNpTrophy2GetTrophyInfo` and `sceNpTrophy2GetGroupInfo` rejected a call unless both outputs were given, although both functions already fill each output only when it is not null. PPSA18391 (Clickteam Fusion) queries trophies with a null `details`; AnyPS5 threw `invalid argument` there and the title ended. Only a call with neither output is rejected now, the same way #912 handled `sceNpTrophy2GetGameInfo`. ### Tested - Ubuntu 24.04, Linux 7.0, GCC 13.3, Release, based on `2220effb`. `guest_nptrophy2` now covers details only, data only and neither (still throws) for both functions; it aborts without the fix. Full ctest: 830/832. The two failures, `agc_driver_emulated_color_compare` (the device cannot sample the sRGB image) and `guest_kernel_stack_protect`, involve no Trophy2 code and fail the same way after a rerun. - PPSA18391: with this change the title gets past its trophy query and reaches the title menu. It also needs other changes that are not upstream yet, so this was checked on a build that includes them. - Windows not built or tested. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
xXPBSXx commented 2026-10-11 20:24:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T20:24:15Z.


Confirmation from a title: Teardown (PPSA15246, with #3952, #3824 and #3604 on top of main) reaches sceNpTrophy2GetGroupInfo after the start-up copy kernel compiles, and stops there with std::invalid_argument (sceNpTrophy2GetGroupInfo: invalid argument), i.e. it calls it with one of details / data null, which the current guard rejects. This PR removes that stop. I did not run the title with this PR applied.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113360599 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3517#issuecomment-6113360599). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T20:24:15Z. --- Confirmation from a title: Teardown (PPSA15246, with #3952, #3824 and #3604 on top of `main`) reaches `sceNpTrophy2GetGroupInfo` after the start-up copy kernel compiles, and stops there with `std::invalid_argument` (`sceNpTrophy2GetGroupInfo: invalid argument`), i.e. it calls it with one of `details` / `data` null, which the current guard rejects. This PR removes that stop. I did not run the title with this PR applied. AI-assisted (Claude Code).
adriadam10 commented 2026-10-11 21:29:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:29:30Z.


Checked on main + PR: build and ctest green; guest_nptrophy2 fails without the change and passes with it (details only, data only, neither still throws, for both functions). No overlap with other open PRs. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113981371 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3517#issuecomment-6113981371). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:29:30Z. --- Checked on main + PR: build and ctest green; `guest_nptrophy2` fails without the change and passes with it (details only, data only, neither still throws, for both functions). No overlap with other open PRs. Merging.
xXPBSXx commented 2026-10-11 22:50:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:50:21Z.


Test from Teardown (PPSA15246), Windows, MinGW GCC 15.2.0, 60 s runs. Without this PR the title ends with std::invalid_argument sceNpTrophy2GetGroupInfo: invalid argument (abort). With this PR merged into a stack with #3604, the Ces exports (#3824) and #3952, the same run no longer ends there: the log shows only AGC graphics: CMASK fast clears of a mipmapped, 3D or array color target are unsupported as the next stop. Not tested: this PR alone.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114782836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3517#issuecomment-6114782836). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:50:21Z. --- Test from Teardown (PPSA15246), Windows, MinGW GCC 15.2.0, 60 s runs. Without this PR the title ends with `std::invalid_argument` `sceNpTrophy2GetGroupInfo: invalid argument` (abort). With this PR merged into a stack with #3604, the Ces exports (#3824) and #3952, the same run no longer ends there: the log shows only `AGC graphics: CMASK fast clears of a mipmapped, 3D or array color target are unsupported` as the next stop. Not tested: this PR alone. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3517
No description provided.