Skip to content

feat(npwebapi2): implement sceNpWebApi2SetRequestTimeout - #2853

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
alfalfa-star:feat/npwebapi2-request-timeout
Oct 14, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
alfalfa-star:feat/npwebapi2-request-timeout

Conversation

@alfalfa-star

@alfalfa-star alfalfa-star commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

Pinball FX (PPSA08755) stops on main 7a0c838 while its main menu appears (log from @leorossi2005):

terminate called after throwing an instance of 'std::runtime_error'
  what():  sceNpWebApi2SetRequestTimeout not implemented

What

Implements sceNpWebApi2SetRequestTimeout(request id, timeout), which still called NotImplemented_nid_no_patch.

Like the other request calls in this library, it succeeds without checking the request id. shadPS4 returns LIB_CONTEXT_NOT_FOUND, USER_CONTEXT_NOT_FOUND or REQUEST_NOT_FOUND for unknown ids, but this library keeps no request table (CreateRequest hands out counter values; AbortRequest, AddHttpRequestHeader and DeleteRequest accept any id), so those checks wait for request tracking across all of them. No request reaches a service (sceNpWebApi2SendRequest fails with UNAVAILABLE at once), so no timeout can expire. The signature follows shadPS4.

  • docs/dev/debt/libSceNpWebApi2.md lists it under Silent stubs with that reason.
  • NpWebApi2 is removed from the TechnicalDebt list of PPSA14632 exports declared without parameters. The only other export there still declared without parameters, sceNpWebApi2AddWebTraceTag, came with PPSA33016.

guest_np_web_api2 creates a request, sets its timeout and deletes it; it aborts with main's Export.cpp.

Tested

Linux (Arch, GCC 15), Release build of this branch rebased onto main e2cd213:

  • Full ctest: 1099 of 1100 pass. agc_driver_tessellation segfaults on plain main on this machine as well.
  • tools/check_conventions.py --base upstream/main passes.
  • I don't have Pinball FX, so the title run is not mine; @leorossi2005, a run of this head would confirm it gets past the menu.

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: Pinball FX (PPSA08755)
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Progress report (e46c695 → 70389c0)

📈 System libraries: 88.25% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNpWebApi2 sceNpWebApi2SetRequestTimeout
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceNpWebApi2 sceNpWebApi2SetRequestTimeout

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Same as #2852: which title stops at sceNpWebApi2SetRequestTimeout on main? A success stub needs a title it unblocks.

@screamm

screamm commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Windows validation of the current head 23aeebfc merged onto main 262c0316.

Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including the libs target.

  • ctest -j8 -E "^agc_|^video_out_flip": 391/392. The one failure is guest_pthread_start hitting its 60 s Windows timeout under -j8 load; it passes 2/2 in 2.5 s when run alone and does not touch this change (it also ran 39 s under the same load on unchanged main here).
  • The change has no test; the build and the existing guest_http2 and guest_np_* tests pass.

Validation run with Claude Code assistance.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Windows run and the TechnicalDebt entry. Before this can go in:

  • No title is named. @oneandonlydean asked which title stops at sceNpWebApi2SetRequestTimeout on main and it is still unanswered. Please add the title ID and the not implemented log line where it stops; the import alone isn't enough.
  • core/libs/prx/libSceNpWebApi2/Export.cpp:156: it succeeds for any request id. shadPS4 routes the call through setRequestTimeout(request_id, timeout) (np_web_api2.cpp:413), so please check what it validates and either follow it or say in the TechnicalDebt line why not.

Happy to look again once a title that reaches it is shown.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 11, 2026
@alfalfa-star
alfalfa-star force-pushed the feat/npwebapi2-request-timeout branch from 23aeebf to 621fd8d Compare October 11, 2026 09:41
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 11, 2026
@alfalfa-star

Copy link
Copy Markdown
Contributor Author

No title I can run reaches sceNpWebApi2SetRequestTimeout on current main (90c152e):

I'm converting this to a draft until a title stops at it. Then I'll post the title ID and the log line and mark it ready.

Changed (rebased onto main):

  • shadPS4 looks the request up through its library and user contexts and returns LIB_CONTEXT_NOT_FOUND, USER_CONTEXT_NOT_FOUND or REQUEST_NOT_FOUND. This library keeps no request table: CreateRequest hands out counter values, and AbortRequest, AddHttpRequestHeader and DeleteRequest accept any id. So following shadPS4 means tracking ids across all of them, which is a separate change. The TechnicalDebt line now says this, under Silent stubs, where main's conventions check now wants it.
  • guest_np_web_api2 now creates a request, sets its timeout and deletes it. It aborts with main's Export.cpp.

Tested: Linux, GCC, Release, RX 9070 XT (RADV): full ctest 813/813 (4 video_out_flip_* skipped) on main 90c152e merged with this branch, #2848 and #2851; tools/check_conventions.py passes.

AI-assisted: yes (Claude Code)

@alfalfa-star
alfalfa-star marked this pull request as draft October 11, 2026 09:45

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answer. Keeping this as a draft until a title actually stops at sceNpWebApi2SetRequestTimeout is right: please post the title ID and the not implemented log line when you have it, then mark it ready.

@leorossi2005

leorossi2005 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

@alfalfa-star @adriadam10 Hi, i've got a title that stops with "sceNpWebApi2SetRequestTimeout not implemented" if it's useful to merge this PR, this happens on main 7a0c838

Nvidia GPU, AMD CPU

It's Pinball FX (PPSA08755), it loads and the main menu i think starts to appear but it stops after some frames and output this

...
[src/Texture.cpp:630 Texture] Texture address=0x20f8ad0000 540x456 mips=1 viewed from storage image (vk=9)
[src/Texture.cpp:904 StorageTexture] StorageTexture address=0x20f8a50000 540x456 mips=1 mip=0 layers=0 base=0 dim=1 tile=0 format=1 vk=9
[src/Texture.cpp:630 Texture] Texture address=0x20f8a50000 540x456 mips=1 viewed from storage image (vk=9)
[src/Texture.cpp:904 StorageTexture] StorageTexture address=0x20f8b50000 540x456 mips=1 mip=0 layers=0 base=0 dim=1 tile=0 format=1 vk=9
[src/Texture.cpp:630 Texture] Texture address=0x20f8b50000 540x456 mips=1 viewed from storage image (vk=9)
[libc] unhandled exception 'St13runtime_error' thrown from 00007ffb620c73f6
terminate called after throwing an instance of 'std::runtime_error'
  what():  sceNpWebApi2SetRequestTimeout not implemented
FATAL: abort() (SIGABRT) on thread 25436
    #0 0x00007ffb6203b4b8 libc.prx+0xb4b8
    #1 0x00007ffb620e05f1 libc.prx+0xb05f1
    #2 0x000000000bcfee90
  stack return address candidates:
    [rsp+0x8] 0x00007ffbead02139 ucrtbase.dll+0xc2139
    [rsp+0x68] 0x00007ffb620c73f6 libc.prx+0x973f6
...

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@alfalfa-star Pinball FX (PPSA08755) stops here on main, see leorossi2005's log above. Please rebase and mark it ready.

alfalfa-star and others added 3 commits October 14, 2026 07:23
The timeout setter takes (request id, timeout) and succeeds without
checking the request, like the other request setters: no request reaches
a service, so no timeout can expire. PPSA14632 imports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…quest id

shadPS4 looks the request up through its library and user contexts and
returns the matching NOT_FOUND error. This library keeps no request
table: CreateRequest hands out counter values and the other request calls
accept any id, so the checks wait for request tracking across all of
them. The entry moves to Silent stubs, as main's conventions check now
requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alfalfa-star
alfalfa-star force-pushed the feat/npwebapi2-request-timeout branch from 19891c7 to 70389c0 Compare October 14, 2026 05:26
@alfalfa-star
alfalfa-star marked this pull request as ready for review October 14, 2026 05:27
@alfalfa-star

Copy link
Copy Markdown
Contributor Author

@oneandonlydean rebased onto main e2cd213 and marked ready. The description now names Pinball FX (PPSA08755) and its log line. Main moved the debt entries into per-library files, so the entry is now under Silent stubs in docs/dev/debt/libSceNpWebApi2.md. Full ctest passes apart from agc_driver_tessellation, which segfaults on plain main here too.

@adriadam10, the earlier change requests were about not having a title; Pinball FX is that title now.

Thanks @leorossi2005 for the log.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 14, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the rebase and the title. The full build is green on this head; before it goes in it needs one run by someone other than the author: Pinball FX (PPSA08755) on current main with and without this PR, showing it gets past sceNpWebApi2SetRequestTimeout. Could someone who has the title post one?

@oneandonlydean
oneandonlydean dismissed stale reviews from adriadam10 and adriadam10 October 14, 2026 06:23

Met on 70389c0: the description now names Pinball FX (PPSA08755) with the log line, which was the open point.

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked: guest_np_web_api2 aborts without the change (the NotImplemented_nid_no_patch throw) and passes with it; scoped build and ctest (33 tests) are green on this head merged onto main. The stub matches the other request calls of this library and the debt entry says why. Pinball FX getting past the menu is not verified by us; merging since the stop in the log is exactly this call.

@adriadam10
adriadam10 merged commit 98541c6 into boykopovar:main Oct 14, 2026
9 checks passed
@alfalfa-star
alfalfa-star deleted the feat/npwebapi2-request-timeout branch October 14, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants