[.NET Core / macOS] Crash upon closing Discord
See original GitHub issueHey, I’ve run into an issue with Discord Rich Presence with my application on macOS with .NET Core. When my app has Presence and I quit Discord (CMD+Q), my app crashes instantly. Originally got this on version 1.0.108, however after updating to 1.0.118 I can also reproduce it consistently. It doesn’t matter if Discord is launched first or my app, if I close Discord while it has Presence it will crash. Force Quitting Discord (killing the process) also crashes my app.
The published app throws this into the Console:
Process is terminating due to StackOverflowException.
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
If I reproduce while debugging, I only get Process is terminating due to StackOverflowException.
in the Console, however there’s now a dotnet has quit unexpectedly
dialog, with the following log (used gist because it’s very long).
There is no managed exception nor managed trace, other than the hint towards a StackOverflowException in the Console.
My Rich Presence implementation can be found here. What probably sticks out is that I allow users to disable/enable the Presence in the app’s preferences, and in case that’s toggled the method Set
is called. Also, if you will attempt to compile it yourself, note that the current master uses a nuget package which is not available anymore and you should use the avalonia-update
branch which, as far as Discord Rich Presence goes, is fully functional.
I’ve only tested on macOS and I get this issue 100% of the time with this repro. I’ll test on Windows very soon and report back, however I don’t have a Linux box to try this on.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
@Lachee Here it is.
The point at which I’ve closed Discord is after line 38, before line 39.
Fixed by d3e9696, thank you for the quick response! By the way, your commit signature doesn’t seem to be correctly tied to your GitHub account 😉