CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.41k stars 65 forks source link

(Discord RPC) Catch SEHException on Dispose #393

Closed shatyuka closed 9 months ago

shatyuka commented 10 months ago

Discord will call CloseHandle on an already closed named pipe "discord-ipc-0" handle if Discord client was closed before we call Destroy. Only affects debug mode.

github-actions[bot] commented 10 months ago

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked ☁️ View the detailed Qodana report

Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions
bagusnl commented 9 months ago

Speaking about Discord RPC, I was working on disabling Idle status, but it fell out due to the RPC not initializing back the RPC activity (it needs a 2nd change to actually change it) despite the dispose method already dispose the RPC history, can you take a look at that?

This is the commit that currently disables that feature https://github.com/CollapseLauncher/Collapse/commit/f4b130dc255ba8f78e31da3efb11828324b77515

shatyuka commented 9 months ago

Speaking about Discord RPC, I was working on disabling Idle status, but it fell out due to the RPC not initializing back the RPC activity (it needs a 2nd change to actually change it) despite the dispose method already dispose the RPC history, can you take a look at that?

This is the commit that currently disables that feature f4b130d

will look into it tomorrow

bagusnl commented 9 months ago

Alrighty thank you, will merge this one for now as neon is starting to finalize his work for HSR repair~

Thank you for your work <3