Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game SDK - main discord app running but no user logged in causes game to crash #6889

Open
jarek-p opened this issue May 23, 2024 · 0 comments
Labels

Comments

@jarek-p
Copy link

jarek-p commented May 23, 2024

Description

We're using Game SDK v.3.2.1 with Unity (only for rich presence functionality) - when the main Discord application is running but there is no user logged in the game crashes when trying to update activity: DiscordInstance.GetActivityManager().UpdateActivity()

We also didn't find a way to reliably check if the user is logged in before calling the UpdateAcitivity(), attempts via userManager methods also resulted in a crash and userManager.OnCurrentUserUpdate += didn't work when user logged in after running the game + when logging out of the discord app while game was running.

Steps to Reproduce

  1. Run main discord app
  2. Log out but keep the app running
  3. Run a game using Unity Discord Game SDK with Rich Presence
  4. Game crashes on trying to update Rich Presence (UNKNOWN error while executing native code

Expected Behavior

Game doesn't crash when attempting to update activity when the discord main app is running but there's no user logged in or there is a reliable way to check if there is a user currently logged in.

Current Behavior

Runtime error and the game crashes (exception
STATUS_HEAP_CORRUPTION / 0x7ffc4fb2f409: Fatal Error: STATUS_HEAP_CORRUPTION / 0x7ffc4fb2f409)

Screenshots/Videos

No response

Client and System Information

Windows, Unity game build, Discord Game SDK v.3.2.1

@jarek-p jarek-p added the bug label May 23, 2024
@jarek-p jarek-p changed the title Game SDK - main discord app running but no user logged in cauy Game SDK - main discord app running but no user logged in causes game to crash May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant