Skip to content

fix: remove duplicate applet init and spurious nvExit() (HOS 22.x)#292

Closed
sapphicdisaster wants to merge 1 commit intoXITRIX:masterfrom
sapphicdisaster:fix/hos22-applet-nvexit-crash
Closed

fix: remove duplicate applet init and spurious nvExit() (HOS 22.x)#292
sapphicdisaster wants to merge 1 commit intoXITRIX:masterfrom
sapphicdisaster:fix/hos22-applet-nvexit-crash

Conversation

@sapphicdisaster
Copy link
Copy Markdown

Tested on HOS 22.0.0 / Atmosphere 1.1. It seems like 22.x tightened up some service lifecycle handling — a couple of things that were previously silent no-ops started causing real issues, so I traced them down:

1. Duplicate applet init calls
appletInitializeGamePlayRecording() and appletSetWirelessPriorityMode() are called in main() before brls::Application::init(), which calls them again internally through SwitchPlatform. Removing the duplicates from main() — borealis already owns these.

2. Spurious nvExit() causing panic on clean exit
nvExit() is called at the end of main(), but nvInitialize() is never called by app code — deko3D handles that internally. On 22.x this extra call panics during teardown, meaning pressing B to exit from the main menu hits an error screen every time. Removing the orphaned call fixes it cleanly.

Happy to add a comment in the code if that's useful, or adjust anything — just wanted to flag this in case others hit it on newer firmware.

- Remove duplicate appletInitializeGamePlayRecording() and
  appletSetWirelessPriorityMode() calls from main(). Both are already
  called internally by borealis SwitchPlatform; double-calling on
  HOS 22.x causes unexpected result codes from the applet manager.

- Remove nvExit() from main(). nvInitialize() is never called by app
  code — deko3D owns the nv service refcount. On HOS 22.x the nv
  service IPC refcounting is stricter; the extra nvExit() caused a
  panic during teardown when pressing B to exit from the main menu.
@sapphicdisaster sapphicdisaster force-pushed the fix/hos22-applet-nvexit-crash branch from d1add4a to 1da7769 Compare April 7, 2026 04:19
@sapphicdisaster
Copy link
Copy Markdown
Author

Sorry about the noise on the previous version of this PR — I'd rebased onto a local fetch of your repo that had picked up your VisionOS and FrameQueue work before it landed on master, so those commits got dragged into the diff. Force-pushed a clean version now — should be just the one commit touching app/src/main.cpp. Apologies for any confusion! 🙏

@XITRIX
Copy link
Copy Markdown
Owner

XITRIX commented Apr 7, 2026

Hi, thanks for your PR, I just noticed it while I did the same change just now

@sapphicdisaster
Copy link
Copy Markdown
Author

Ah, great minds! Thanks so much for all your work on this project — and for the major performance improvements and deko3d work too, that's exciting. Closing this out since you've got it covered. 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants