fix(libScePlayGoDialog): return error for uncompleted dialog in scePlayGoDialogGetResult #7396

Merged
ErenYeager1836 merged 4 commits from upstream-pr/7396 into main 2026-10-19 20:18:47 +00:00
ErenYeager1836 commented 2026-10-18 04:35:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-18T04:35:33Z.


What

Ensures scePlayGoDialogGetResult validates that the dialog is in finished state before returning results.

Previously, calling scePlayGoDialogGetResult while initialized or before open/completion returned RESULT_OK (0) with zeroed result data. shadPS4's scePlayGoDialogGetResult is a dummy stub that always returns OK and does not provide evidence for unfinished return values. Following all other common dialog modules across the tree (MsgDialog, SigninDialog, PlayerSelectionDialog, SaveDataDialog), queries before completion return COMMON_DIALOG_ERROR_NOT_FINISHED (0x80B80005).

Tested

  • python tools/check_conventions.py --base upstream/main passes cleanly.
  • guest_playgo_dialog unit test suite passes locally with CTest (100% tests passed out of 1).

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 under Silent stubs in their library's technical debt file
  • 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
  • Unblocks: PlayGo dialog state validation
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4906390893 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-18T04:35:33Z. --- ### What Ensures `scePlayGoDialogGetResult` validates that the dialog is in finished state before returning results. Previously, calling `scePlayGoDialogGetResult` while initialized or before open/completion returned `RESULT_OK` (0) with zeroed result data. shadPS4's `scePlayGoDialogGetResult` is a dummy stub that always returns OK and does not provide evidence for unfinished return values. Following all other common dialog modules across the tree (`MsgDialog`, `SigninDialog`, `PlayerSelectionDialog`, `SaveDataDialog`), queries before completion return `COMMON_DIALOG_ERROR_NOT_FINISHED` (`0x80B80005`). ### Tested - `python tools/check_conventions.py --base upstream/main` passes cleanly. - `guest_playgo_dialog` unit test suite passes locally with CTest (`100% tests passed out of 1`). ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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] Unblocks: PlayGo dialog state validation - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 04:48:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T04:48:41Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestPlayGoDialog.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6245802483 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#issuecomment-6245802483). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T04:48:41Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestPlayGoDialog.cpp` |
wachi35676 commented 2026-10-18 12:05:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T12:05:47Z.


Tested on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, this PR applied onto main 3e3e8b905: guest_playgo_dialog passes, and fails on main with only the test change.

Where does 0x80ED0005 come from?

  • shadPS4 (860a477) defines 0x80ED0001–0x80ED0007 as ORBIS_ERROR_DIALOG_ERROR_* in ime/ime_error.h, the ErrorDialog range.
  • shadPS4's PlayGoDialog uses CommonDialog::Error codes (0x80B8xxxx).
  • Every other common dialog in the tree returns COMMON_DIALOG_ERROR_NOT_FINISHED (0x80B80005) from GetResult before the dialog finishes.

Without a measurement or a title trace, please add a docs/dev/debt/libScePlayGoDialog.md entry that records the code and the state check as unverified. Small thing: uninitResult is used while the dialog is initialized.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249707163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#issuecomment-6249707163). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T12:05:47Z. --- Tested on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, this PR applied onto `main` `3e3e8b905`: `guest_playgo_dialog` passes, and fails on `main` with only the test change. Where does `0x80ED0005` come from? - shadPS4 (`860a477`) defines `0x80ED0001`–`0x80ED0007` as `ORBIS_ERROR_DIALOG_ERROR_*` in `ime/ime_error.h`, the ErrorDialog range. - shadPS4's PlayGoDialog uses `CommonDialog::Error` codes (`0x80B8xxxx`). - Every other common dialog in the tree returns `COMMON_DIALOG_ERROR_NOT_FINISHED` (`0x80B80005`) from GetResult before the dialog finishes. Without a measurement or a title trace, please add a `docs/dev/debt/libScePlayGoDialog.md` entry that records the code and the state check as unverified. Small thing: `uninitResult` is used while the dialog is initialized. AI-assisted: yes (Claude Code); results above were run on this machine.
ErenYeager1836 commented 2026-10-18 12:18:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-18T12:18:22Z.


Thanks for the review, @wachi35676! Updated GuestPlayGoDialog.cpp to rename the test variable to unfinishedResult, and added docs/dev/debt/libScePlayGoDialog.md recording that 0x80ED0005 (ERROR_INVALID_STATE) and the intermediate completion state check are unverified against real hardware/title traces.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249823655 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#issuecomment-6249823655). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-18T12:18:22Z. --- Thanks for the review, @wachi35676! Updated GuestPlayGoDialog.cpp to rename the test variable to unfinishedResult, and added docs/dev/debt/libScePlayGoDialog.md recording that 0x80ED0005 (ERROR_INVALID_STATE) and the intermediate completion state check are unverified against real hardware/title traces.
adriadam10 commented 2026-10-19 14:26:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T14:26:57Z.

Review: CHANGES_REQUESTED


Thanks, the status check is a reasonable direction, but the error code has no source yet:

  • core/libs/prx/libScePlayGoDialog/Export.cpp:22 / :70: 0x80ED0005 is not a CommonDialog code. shadPS4 defines 0x80ED0001-0x80ED0007 as the ErrorDialog range (ime/ime_error.h), while its PlayGoDialog uses CommonDialog::Error (0x80B8xxxx, NOT_FINISHED = 0x80B80005). Every other common dialog in the tree (MsgDialog, SigninDialog, PlayerSelectionDialog, SaveDataDialog) returns 0x80B80005 from GetResult before the dialog finishes. Please either return 0x80B80005 here too (and pin that value in GuestPlayGoDialog.cpp), or show a title trace/measurement that PlayGoDialog really returns 0x80ED0005.
  • shadPS4's scePlayGoDialogGetResult is a dummy that always returns OK, so it is not evidence for either value; say so in the description rather than "in real usage".
  • core/libs/tests/GuestPlayGoDialog.cpp also conflicts with #6044 (same file); rebase after whichever lands first.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5573057324 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#pullrequestreview-5573057324). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T14:26:57Z. **Review:** CHANGES_REQUESTED --- Thanks, the status check is a reasonable direction, but the error code has no source yet: - `core/libs/prx/libScePlayGoDialog/Export.cpp:22` / `:70`: `0x80ED0005` is not a CommonDialog code. shadPS4 defines `0x80ED0001`-`0x80ED0007` as the ErrorDialog range (`ime/ime_error.h`), while its PlayGoDialog uses `CommonDialog::Error` (`0x80B8xxxx`, `NOT_FINISHED = 0x80B80005`). Every other common dialog in the tree (MsgDialog, SigninDialog, PlayerSelectionDialog, SaveDataDialog) returns `0x80B80005` from GetResult before the dialog finishes. Please either return `0x80B80005` here too (and pin that value in `GuestPlayGoDialog.cpp`), or show a title trace/measurement that PlayGoDialog really returns `0x80ED0005`. - shadPS4's `scePlayGoDialogGetResult` is a dummy that always returns OK, so it is not evidence for either value; say so in the description rather than "in real usage". - `core/libs/tests/GuestPlayGoDialog.cpp` also conflicts with #6044 (same file); rebase after whichever lands first.
ErenYeager1836 commented 2026-10-19 14:42:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-19T14:42:34Z.


Thanks for the review!

  • Changed the return code from 0x80ED0005 to 0x80B80005 (COMMON_DIALOG_ERROR_NOT_FINISHED) in scePlayGoDialogGetResult to match the other common dialog implementations across the tree (MsgDialog, SigninDialog, PlayerSelectionDialog, SaveDataDialog).
  • Updated GuestPlayGoDialog.cpp to explicitly pin 0x80B80005u.
  • Updated the technical debt documentation and PR description to clarify that shadPS4's scePlayGoDialogGetResult is a dummy stub that always returns OK, and that the return code follows the common dialog convention.
  • Tested cleanly against upstream/main; ready to rebase after #6044 if #6044 lands first.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6269941268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#issuecomment-6269941268). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-19T14:42:34Z. --- Thanks for the review! - Changed the return code from `0x80ED0005` to `0x80B80005` (`COMMON_DIALOG_ERROR_NOT_FINISHED`) in `scePlayGoDialogGetResult` to match the other common dialog implementations across the tree (`MsgDialog`, `SigninDialog`, `PlayerSelectionDialog`, `SaveDataDialog`). - Updated `GuestPlayGoDialog.cpp` to explicitly pin `0x80B80005u`. - Updated the technical debt documentation and PR description to clarify that shadPS4's `scePlayGoDialogGetResult` is a dummy stub that always returns OK, and that the return code follows the common dialog convention. - Tested cleanly against `upstream/main`; ready to rebase after #6044 if #6044 lands first.
adriadam10 commented 2026-10-19 20:19:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T20:19:38Z.


Thanks, 0x80B80005 matches the other common dialogs and the test pins it. Added one commit: the debt line moves from the new "Unverified behaviors" section to the existing "Unknown function info" one. Checked the test fails on main (returns 0 at status 1) and the scope's ctest is green; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6276448005 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7396#issuecomment-6276448005). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T20:19:38Z. --- Thanks, `0x80B80005` matches the other common dialogs and the test pins it. Added one commit: the debt line moves from the new "Unverified behaviors" section to the existing "Unknown function info" one. Checked the test fails on `main` (returns 0 at status 1) and the scope's ctest is green; merged.
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!7396
No description provided.