question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[.NET Core / macOS] Crash upon closing Discord

See original GitHub issue

Hey, 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mat1jaczyyycommented, Aug 11, 2019

@Lachee Here it is.

The point at which I’ve closed Discord is after line 38, before line 39.

0reactions
mat1jaczyyycommented, Aug 12, 2019

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 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

MacOS discord keeps crashing on launch since Halloween ...
Tried reinstalling and still no luck. I get to the boot up screen with the new pumpkin logo and then instantly crashes, no...
Read more >
How to Fix Discord's Crash Issues
Fix Discord Keeps Crashing by Deleting the AppData · Right-click the Windows taskbar and select Task Manager. · Choose Discord in the app...
Read more >
Discord will crash on my macbook repeatedly, no matter ...
I will open discord, and it will crash. I have: changed networks. restarted discord.
Read more >
Discord crashing when closing or opening DMs & ...
Discord is allegedly aware of the issue where the app keeps crashing when opening or closing DMs, changing servers, or closing pop-ups.
Read more >
Discord is crashing or behaving strangely. What do I do?
Fix #1: Disable hardware acceleration · In Discord, navigate to User Settings and click on it. Discord settings 1024x576 · In the left...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found