zoeyjodon / moonlight-N3DS

Gamestream client for the New 3DS
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
88 stars 4 forks source link

N3DSXL crash after pairing #24

Closed Adnan12349 closed 2 months ago

Adnan12349 commented 3 months ago

NVidia Geforce Experience version: 3.27.0.120 Moonlight Embedded version: v1.1.0 Moonlight Embedded source: https://github.com/zoeyjodon/moonlight-N3DS/releases/tag/v1.1.0 Moonlight Embedded running on: win 10 Moonlight Embedded running on distribution: win 10

After I input my pc IP into my New 3ds XL, it then asks me to pair it. Once done I could see my pc IP on it, pressing any button causes immediate Arm11 crash, but now it crashes everytime I open moonlight, so I deleted the \3ds\moonlight folder, and I could open the app again, I tried reconnecting to my pc using Nvidia GameStream and Sunshine, but no luck, my 3ds keeps crashing after I pairing.

chrisis123 commented 3 months ago

I have the exact same issue, could set up the IP but once the IP is set up i get the immediate crash too... (tried it on a N3DSXL, have a regular N3DS too but don't have access to that one just right now so will try later if it shows the same error)

zoeyjodon commented 3 months ago

Documenting the testing I've done so far for future reference. I just tested pairing with the following setups, and can confirm they work on my local setups:

Client info: Moonlight Embedded version: v1.1.0 Client 3DS: New Nintendo 3DS (non-XL) 3DS Firmware version: 11.17.0-50U 3DS Luma version: v13.0.2

First Host Info: NVidia Geforce Experience version: 3.27.0.120 Host PC OS: Windows 11 Connected to 5ghz wifi network

Second Host Info: Sunshine version: v0.22.2 Host PC OS: Windows 10 Connected to 5ghz wifi network

I cleared my /3ds/moonlight folder before each pairing process just to be safe. @chrisis123 please let me know if your standard n3ds also crashes, because I don't have an XL to test with. I would be surprised if it made a difference, but it'll be good to know either way. Also, it would help if either or both of you could test your setup using a different moonlight client, just too make sure everything is working on the host side of things.

chrisis123 commented 3 months ago

I just tried it on my regular N3DS, same error. Can pair fine with my host PC (Windows 11 with Sunshine 0.22.2, PC connected to my router via LAN, local network is 192.168.1.x). Other Moonlight clients work fine with this setup. I'm on latest Luma 13.0.2 and N3DS 11.17.0-50E on both my N3DSXL and regular N3DS. Though I'm chainbooting Luma through Fastboot 3DS on both devices (only thing that is out of the regular, standard homebrew setup, use this setup for convenience booting into Open AGB Firm). I have attached the crash dump from Luma if that helps... crash_dump_00000004.dmp

And yes, I've been using Moonlight on various devices before and just to be sure I just tested it now with my Steamdeck, no problems there... I also tried deactivating New 3DS CPU and Redirect app. syscore threads to core2 in Luma settings but the crash remains.

zoeyjodon commented 3 months ago

Judging by the crash dump you sent, the exception looks like it might be coming from some issue with writing to the pairing keys file... Just covering all my bases here, you've got at least 6kb of free space on your SD card, right?

chrisis123 commented 3 months ago

Yeah got at least a few hundred MB free at least on both 3DSes SDs...

zoeyjodon commented 3 months ago

I might have to chainboot luma through fastboot then to see if that gets me to reproduce the issue... After moonlight generates the keys, if you check /3ds/moonlight/keys, do you have all of the following files:

chrisis123 commented 3 months ago

I have the following files under keys, no idea where that .p12 extension is coming from as according to your list it should only be called client...

I also tried renaming client.p12 to only client it still crashes the same though

Adnan12349 commented 3 months ago

I somehow got it working when my pc IP changed, I have no idea how does that affect pairing devices and resulting to a crash. Sorry to put it here, but there's also an issue where setting the swap A/B and X/Y to true resets to false every time Moonlight is opened, even checking it to true in moonlight.conf reverts back automatically upon launch.

HyPerMax5 commented 3 months ago

Was able to replicate the fix. I have a static IP on LAN. Switched to Wi-Fi and was able to stream to my 3DS successfully.

Found out why it's not recommended to use the "old" 3DS, as I unfortunately don't have a N3DS lol Was able to replicate the issue using v1.0.0, v1.0.1, and v1.1.0

Every crash dump included: "/3ds/moonlight/keys" Didn't spot any other relevant info within the dumps, though I have attached one of the dumps in case I missed something as I'm not familiar with the 3DS outside of regular operation.

Changing my IP back to DHCP didn't change the result. However I did get it working again by manually assigning a different IP.

Luma v13.0.2 Sunshine 0.22.2 "old" 3DS crash_dump_00000002.dmp

zoeyjodon commented 3 months ago

@Adnan12349, @HyPerMax5, or @Scarliazing, could one of you let me know what IP address your host had when you were able to reproduce the crash?

Scarliazing commented 3 months ago

I am also having this error, instantly as it pairs it crashes and every time I open it again crashes again, I deleted the folder as Adan says to only open again the app but no matter how I try it just fails, could @HyPerMax5 or @Adnan12349 show us how exactly did you get it working? Please

Scarliazing commented 3 months ago

@Adnan12349, @HyPerMax5, or @Scarliazing, could one of you let me know what IP address your host had when you were able to reproduce the crash?

Sure, in my case it was 192.168.0.2

HyPerMax5 commented 3 months ago

@Adnan12349, @HyPerMax5, or @Scarliazing, could one of you let me know what IP address your host had when you were able to reproduce the crash?

My host was on 192.168.1.6 The IP I got it working with on LAN was 192.168.1.28 and I think the Wi-Fi IP was 192.168.1.240

Adnan12349 commented 3 months ago

@Adnan12349, @HyPerMax5, or @Scarliazing, could one of you let me know what IP address your host had when you were able to reproduce the crash?

My host was 192.168.1.9 Then changed to 192.168.1.21

amberdambey commented 2 months ago

If it's helpful for debugging, I have a crash dump for my configuration, and my local network assigns IPs to the 172.16.0.0/24 range. I also tried it with my phone's hotspot which uses the 10.0.0.0/24 range. It seems to not crash when using my secondary LAN (2.4 GHz Wi-Fi only, 172.20.10.0/24) when Sunshine's public IP address setting is set to the IP of the computer itself.

LukaTV939 commented 2 months ago

Getting the same crashes, but on a normal N3DS 11.17.0-50U is the sys version btw and v13.0.2 luma crash_dump_00000013.dmp crash_dump_00000012.dmp crash_dump_00000014.dmp

zoeyjodon commented 2 months ago

Alright, I FINALLY reproduced this and I think I have a fix for it. If anyone is still experiencing this, try this build out: https://github.com/zoeyjodon/moonlight-N3DS/actions/runs/8854578368/artifacts/1452382866

chrisis123 commented 2 months ago

Alright, I FINALLY reproduced this and I think I have a fix for it. If anyone is still experiencing this, try this build out: https://github.com/zoeyjodon/moonlight-N3DS/actions/runs/8854578368/artifacts/1452382866

I just tried it (before trying this build I tried the old one to see if the crash still was there - it was) and this does indeed fix the crash for me, same setup as before works perfectly fine with this build after playing around with it for a few minutes. Thank you :)

zoeyjodon commented 2 months ago

Fixed in https://github.com/zoeyjodon/moonlight-N3DS/pull/33