Atmosphere-NX / Atmosphere

Atmosphère is a work-in-progress customized firmware for the Nintendo Switch.
GNU General Public License v2.0
14.41k stars 1.21k forks source link

Error 2001-0125 when launching hbmenu via app override on 4.0.1 #1164

Closed mitchellmebane closed 4 years ago

mitchellmebane commented 4 years ago

Bug Report

With HOS 4.0.1 and Atmosphere 0.14.4, Atmosphere crashes when launching hbmenu via app override, similar to #905.

What's the issue you encountered?

hbmenu crashes when trying to launch it via a game, though it works fine in applet mode.

How can the issue be reproduced?

Crash Report

https://gist.github.com/mitchellmebane/21c02cf36dbcd5cb581d6d4ed97646b1

System Firmware Version

4.0.1 on both sys and emu

Environment?

Additional context?

The same issue occurs with switchbrew/nx-hbmenu@45efcfcb9869f0d1dae43c20672d420eec011181 compiled with libnx 3.3.0.

The crash dump of that, and the compiled hbmenu, are at https://gist.github.com/mitchellmebane/ce26f1d1c5806af0c735f93f9cee78e3

SciresM commented 4 years ago

Not an atmosphere issue.

The problem is that am is trying to boost system memory limit (for automatic gameplay recording), but nx-hbloader has already allocated all of the application memory.

The root issue appears to be that nx-hbloader doesn't detect automatic recording on 4.x (the relevant block is inside hosversionAbove(5, 0, 0)): https://github.com/switchbrew/nx-hbloader/blob/master/source/main.c#L201

This should probably be changed in nx-hbloader.

SciresM commented 4 years ago

Should be resolved by https://github.com/switchbrew/nx-hbloader/pull/32

mitchellmebane commented 4 years ago

Indeed, I tried with a 1.0.0 game (Cave Story+) and the crash went away. I then compiled the new version of hbloader and switched back to my 4.0.1 game (Owlboy) and that worked as well. Thanks!