fix(libSceHttp): sceHttpWaitRequest reports no ready requests #1775

Merged
MathiasDevelopes merged 1 commit from upstream-pr/1775 into main 2026-10-09 08:02:44 +00:00
MathiasDevelopes commented 2026-10-08 18:50:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MathiasDevelopes on 2026-10-08T18:50:48Z.


What

sceHttpWaitRequest always returned the network error (0x80431063). Titles that poll their HTTP epoll every frame treat any error other than their expected codes as fatal: Planet Coaster (PPSA01736) hits a ud2 in its HTTP job on the first poll.

No request is ever pending, since sceHttpSendRequest fails at once with the network error. The wait now does what it would on a console with nothing in flight: it waits for the timeout and returns 0 events.

  • A null handle, a null event array or a non-positive event count returns the invalid-value error.
  • A negative timeout (no limit) would never return, so it throws (NotImplemented_nid_no_patch).
  • The microsecond unit, the negative-means-no-limit reading and the invalid-value cases are assumptions, recorded in TechnicalDebt.

Tested

Windows 11, MinGW-w64 15.2.0. guest_http covers zero and non-zero timeouts and the three invalid-argument cases; the full ctest suite passes (475/475). tools/check_conventions.py --base origin/main passes. With this change, Planet Coaster (PPSA01736) gets past its first HTTP poll and goes on to load assets and render.

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
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4791380928 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1775). Originally posted by [MathiasDevelopes](https://github.com/MathiasDevelopes) on 2026-10-08T18:50:48Z. --- ### What `sceHttpWaitRequest` always returned the network error (`0x80431063`). Titles that poll their HTTP epoll every frame treat any error other than their expected codes as fatal: Planet Coaster (PPSA01736) hits a `ud2` in its HTTP job on the first poll. No request is ever pending, since `sceHttpSendRequest` fails at once with the network error. The wait now does what it would on a console with nothing in flight: it waits for the timeout and returns 0 events. - A null handle, a null event array or a non-positive event count returns the invalid-value error. - A negative timeout (no limit) would never return, so it throws (`NotImplemented_nid_no_patch`). - The microsecond unit, the negative-means-no-limit reading and the invalid-value cases are assumptions, recorded in TechnicalDebt. ### Tested Windows 11, MinGW-w64 15.2.0. `guest_http` covers zero and non-zero timeouts and the three invalid-argument cases; the full ctest suite passes (475/475). `tools/check_conventions.py --base origin/main` passes. With this change, Planet Coaster (PPSA01736) gets past its first HTTP poll and goes on to load assets and render. ### Checklist - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
copilot-pull-request-reviewer[bot] commented 2026-10-08 18:50:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-08T18:50:53Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5461407516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1775#pullrequestreview-5461407516). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-08T18:50:53Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
github-actions[bot] commented 2026-10-08 18:51:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T18:51:21Z.


Progress report (55e8959 → 485eb1a)

📉 System libraries: 84.73% (-0.03%, -1 reverted functions)

⚠️ 1 went back to stubs
Library Name
libSceHttp sceHttpWaitRequest
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6066822721 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1775#issuecomment-6066822721). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T18:51:21Z. --- <!-- progress-report --> ### Progress report (55e8959 → 485eb1a) 📉 **System libraries**: 84.73% (-0.03%, -1 reverted functions) <details> <summary>⚠️ 1 went back to stubs</summary> | Library | Name | | - | - | | libSceHttp | `sceHttpWaitRequest` | </details>
github-actions[bot] commented 2026-10-08 19:08:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T19:08:06Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1908 docs/dev/TechnicalDebt.md L235
#2001 core/libs/prx/libSceHttp/Export.cpp L6-9
docs/dev/TechnicalDebt.md L226-235
#2017 docs/dev/TechnicalDebt.md L235
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6067106382 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1775#issuecomment-6067106382). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T19:08:06Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1908 | `docs/dev/TechnicalDebt.md` [L235](https://github.com/boykopovar/AnyPS5/blob/f145139676a48306681d3a4d5fabf83938759daf/docs/dev/TechnicalDebt.md#L235) | | | | #2001 | `core/libs/prx/libSceHttp/Export.cpp` [L6-9](https://github.com/boykopovar/AnyPS5/blob/f145139676a48306681d3a4d5fabf83938759daf/core/libs/prx/libSceHttp/Export.cpp#L6-L9)<br>`docs/dev/TechnicalDebt.md` [L226-235](https://github.com/boykopovar/AnyPS5/blob/f145139676a48306681d3a4d5fabf83938759daf/docs/dev/TechnicalDebt.md#L226-L235) | | | | #2017 | `docs/dev/TechnicalDebt.md` [L235](https://github.com/boykopovar/AnyPS5/blob/f145139676a48306681d3a4d5fabf83938759daf/docs/dev/TechnicalDebt.md#L235) | | |
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!1775
No description provided.