XITRIX / Moonlight-Switch

Moonlight port for Nintendo Switch
777 stars 47 forks source link

Crashes on opening with latest firmware + atmosphere #85

Closed Saoirse042 closed 4 months ago

Saoirse042 commented 1 year ago

Hi there!

Unfortunately, I don't have any error codes, I just got the generic "The software was closed because an error occurred" screen on trying to open the app from the full (not applet) homebrew menu.

I'm currently using Atmosphere 1.4.0, and firmware 15.0.1, which might have something to do with it...

XITRIX commented 1 year ago

Try to clean /switch/Moonlight-Switch folder on your SD card and rerun app

Saoirse042 commented 1 year ago

Will try this now and let you know, thank you!

Saoirse042 commented 1 year ago

Update: this worked and I have no idea why - I didn't have a previous install or anything.. thank you!!

Saoirse042 commented 1 year ago

Ok, I can open the app now but it crashes with the same generic error every time I connect to a host.. I'm honestly guessing this is part of the latest firmware? Might try downgrading to see if it makes a difference

mty0313 commented 1 year ago

I have the same issue

noclueoncoding commented 1 year ago

Same here. It crashes when connecting to the host.

Edit: I also have FW 15.0.1 and Atmosphere 1.4.0

XITRIX commented 1 year ago

I've not updated my switch yet, will try to check soon

Marygraceee commented 1 year ago

Doesn't work for me either. I input the ip, I input the 4 digit code on pc, then when i try to connect with the host, it gives me the generic error.

XITRIX commented 1 year ago

@Marygraceee, does any other moonlight client works? I.e. Android one

noclueoncoding commented 1 year ago

I might finally have found the culprit for Moonlight-Switch crashing on the latest FW & atmosphere. Moonlight-Switch had always been very unstable for me. Even when it worked, it crashed every 2nd or 3rd time using it while starting and or closing the app. This is the reason I always had to resort to Moonlight-NX of rock88. Not anymore, baby I always had the hunch that it had something to do with the cover art of the games which is transfered from the moonlight server on the initial connection. With the last version (0.12.1) I was able to see the game gallery populate after connecting but after 2-3 seconds the screen turned black, the app crashed and I would get the well known generic error. So I figured that I should have a look into the boxart folder and there it was: I found one .png which had the size of 0 byte. Deleting it (or the whole boxart folder) and connecting again didn't do the trick since it would always be this .png which was empty and seemingly stopped the process. So I checked the boxart folder of Moonlight-NX which I had installed parallelly. And curiously I could observe the same phenomenon but Moonlight-NX seemed to have no problem with it. In sum the were two empty .pngs in the folder (the one of Steam itself and the one of Divinity: Original Sin 2) So I did the simplest thing I could think of and took a random "not-empty" png, made two copies, renamed each after one of the empty .pngs and put them into the boxart folder of Moonlight-Switch. I reconnected to the server aaaand - et voila - it works! The gallery populates fully and no crashes anymore, at all! I dare not to say but the app runs rock solid now. So the problem was Moonlight-Switch seems to choke on empty cover .pngs and and then crashes hard.

Open questions:

  1. Why are there empty cover .pngs in the first place?
  2. Why is Moonlight-Switch crashing this hard (sometimes I needed 2 reboots before the app was even accessible again)?
XITRIX commented 1 year ago

@noclueoncoding, wow, thanks for research, I'll try to figure it out why broken PNG files appears and crashes entire app.

Speaking about unstability of Moonlight-Switch, maybe it's because of UI framework Borealis, it was in not finished state and I've modified it a lot while just learned C++, also I'm not so great at debugging Switch's crashlogs, all bugs I've ever fixed I've found running app on my Mac (of course there could be Switch specific bugs I've could miss) but until I was able to play games on Switch I thought it would be ok.

Also, I don't know why, but stability is really varies from Switch to Switch.

briankendall commented 1 year ago

Chiming in to say that it's not working for me either. 😞 I don't get any notification of the game crashing, but when I launch Moonlight it just gets stuck at a black screen, and nothing else ever happens. I'm on an unpatched Switch with firmware 15.0.1 and Atmosphere 1.4.1.

XITRIX commented 1 year ago

@briankendall, try to clean /switch/Moonlight-Switch folder and restart the app

XITRIX commented 4 months ago

Should be fixed in v1.0