MCMi460 / NSO-RPC

Connect your Nintendo Switch playing status to Discord!
321 stars 32 forks source link

Crashing when left open #92

Open Ariikitty opened 1 year ago

Ariikitty commented 1 year ago

I have found an issue on Windows where when the application is left open, whether this be in the dock or just minimised, the application seems to hang and then crash.

It seems like after a little while, the application stops pulling information from the friends list and then trying to select anything causes a crash to happen. I have found this happening after about 12 - 36 hours of having the application open but it may happen sooner, I just haven't properly timed it.

HotaruBlaze commented 1 year ago

Do you get any kind of error popup?

MCMi460 commented 1 year ago

I do remember this being a problem a while back, but I thought that we fixed it. It's likely that it's somehow timing out when connecting to Nintendo, and when clicking a button on the menu bar, it tries to fetch from Nintendo using a dead session. I don't remember much, but if I were to guess, this happens most consistently when the app is subjected to trying to live through sleep mode?

Ariikitty commented 12 months ago

I'm extremely late to these replies, to which I apologies.

Do you get any kind of error popup?

None, the crash doesn't happen till I restore the app from being minimized but even before restoring the app it's not posting anything to discord.

I do remember this being a problem a while back, but I thought that we fixed it. It's likely that it's somehow timing out when connecting to Nintendo, and when clicking a button on the menu bar, it tries to fetch from Nintendo using a dead session. I don't remember much, but if I were to guess, this happens most consistently when the app is subjected to trying to live through sleep mode?

It could be, going to try turning off sleep mode and leave my computer idle and see if I get the same result

Ariikitty commented 11 months ago

Okay I have done more testing. I tried two tests where I have left my PC on and not in sleep mode (I can tell it hasn't gone into sleep mode cause a) I disabled it and b) I left an auto-clicker on cookie clicker for the duration of a day).

I have found that it only crashes if it's left open while Discord has been closed. I know there's an error message when it can't connect to discord if the application is opened before Discord is but there's nothing to say there's any issue with Discord being closed while the application is still running. It's also not till you try to restore the application from the system tray does it actually crash but it also won't update the discord status when you reopen Discord after a few hours

Leaving the program and Discord open all day does mean the application runs properly (at the cost of notifications being sent your mobile being inconsistent but that's a Discord issue)

HotaruBlaze commented 11 months ago

I'm wondering how old your version is, although your initial issue is made just over a week after v1.3.8, it makes me wonder if using the latest version would resolve this, as retry code was added to the discord part: https://github.com/MCMi460/NSO-RPC/commit/db08d6c0a0d0546fce411160d5610cc76f8b91c2 and version details is still stuck in the development branch


I also have a development build that uses the latest development branch here that has an unrelated fix if you wanted to give this one a shot: https://github.com/HotaruBlaze/NSO-RPC/releases/tag/getVersion-Rewrite-build

Ariikitty commented 11 months ago

I was wondering if I am a build behind but I couldn't find a version number from within the application so it may be worth checking it out, thank you

HotaruBlaze commented 11 months ago

You're able to see where the version would be displayed here https://github.com/MCMi460/NSO-RPC/pull/96, Under the NSO-RPC name at the top left red square