misson20000 / twili

Homebrew debug monitor for the Nintendo Switch.
GNU General Public License v3.0
184 stars 23 forks source link

Attemt to open hbmenu leads to crash #102

Open DCNick3 opened 4 years ago

DCNick3 commented 4 years ago

The sysmodule works, I can even communicate with it and get some information from console. But when I try to run hbmenu (using key-combo), I get an atmosphere crash screen with empty register value and traceback full of zeros.

Versions of software used: twili 1.3.0 Firmware 9.0.0 Atmosphere 0.10.5

epopcop commented 4 years ago

Same. only difference for me is FW 9.0.1. The error code i'm receiving is: 2239-0021 / 0x2aef.

DCNick3 commented 4 years ago

Hmm, for me it's a different error - 0x19280. I found some information that it's an AM_BUSY_ERROR, which can be returned by OpenApplicationProxy. Programs are to wait a bit and retry the call. Will investigate...

DCNick3 commented 4 years ago

Changed the code that calls OpenLibraryAppletProxyOld to handle this result.

    ipc::client::Object ilap;
    do {
        auto rc = iasaps.SendSyncRequest<200>( // OpenLibraryAppletProxyOld
            ipc::InPid(),
            ipc::InRaw<uint64_t>(0),
            ipc::InHandle<handle_t, ipc::copy>(0xffff8001),
            ipc::OutObject(ilap));
        if (!rc) {
            auto error = rc.error();
            if (error.code == 0x19280) { // "BUSY"; see https://switchbrew.org/wiki/Applet_Manager_services#OpenApplicationProxy
                svcSleepThread(10000000);
                continue;
            }
            throw ResultError(error);
        }
    } while (false);

Now I get 2001-0123 (Kernel error "Port remote dead"). Not sure what to do with that...

misson20000 commented 4 years ago

@epopcop your issue was fixed in AMS 0.11.0, but skip over that of course and go to 0.11.1. @DCNick3 Can you also try on AMS 0.11.1?

DCNick3 commented 4 years ago

Well, with twili 1.3.0 on atmosphere 0.11.1 I still get 0x19280

DCNick3 commented 4 years ago

And with applied change I still get 0xf601... So, nothing changed when I updated to AMS 0.11.1.