discord / discord-rpc

https://discordapp.com/developers
MIT License
1.04k stars 322 forks source link

Not allowing games to close on Windows 7 machines #275

Open subsoap opened 5 years ago

subsoap commented 5 years ago

For Defold game engine we have an extension implemented for Rich presence. We have Windows 7 users reporting that the game doesn't close, and it is apparently the fault of the Discord extension.

To test download Defold editor here http://d.defold.com/stable/

And extension with example project here https://github.com/subsoap/discordrich

You'll then need a Win7 install to test on. Assistance with this would be appreciated!

Ok, we managed to find a Win7 VM to install steam and try on. And we could reproduce the same behavior.

By checking the option “non intrusive” (or something), we managed WinDbg to attach to the process, and this is the callstack we got.

So, next I tried bundling without the discord extension, and then the executable shut down as it should.

Regarding the callstack, we also found this hotfix which seem to describe the problem:

https://support.microsoft.com/en-us/help/2582203/a-process-that-is-being-terminated-stops-responding-in-windows-7-or-in

screen shot 2019-02-25 at 10 15 07

https://github.com/subsoap/discordrich/issues/3

subsoap commented 5 years ago

A user reported not having the desktop client installed. But installing it did and having it running not impact is this issue so may not be related.

msciotti commented 5 years ago

Hm, in the past failures/crashes on game close were due to some weirdness in our Discord_Shutdown() logic, but I thought we'd iron out all those kinks.

Are you calling Discord_Shutdown() on game exit?

subsoap commented 5 years ago

We are, but I can test calling it sooner.

subsoap commented 5 years ago

We are "resolving this" by disabling the Discord extension on Windows 7. If anyone from Discord team can figure out fix eventually would be good!

https://github.com/subsoap/discordrich/issues/3