Vatuu / discord-rpc

Java Wrapper of the Discord-RPC Library for Discord Rich Presence.
MIT License
194 stars 42 forks source link

SIGSEGV when running multiple instances #43

Closed Spikatrix closed 3 years ago

Spikatrix commented 3 years ago

I have integrated Discord RPC functionality in my game using the jar file from the releases page (v1.6.2). It works just fine, but when I launch two instances of my game, the old instance crashes with a SIGSEGV. When I remove the Discord RPC related code, the game doesn't crash when launching multiple instances so it's something related to this.

This is basically what my code looks like:

DiscordRPC.discordInitialize(applicationID, null, false);
richPresence = new DiscordRichPresence.Builder("")
        .setBigImage("logo", "v0.0.1")
        .setStartTimestamps(System.currentTimeMillis())
        .build();
richPresence.state = stateStr;
DiscordRPC.discordUpdatePresence(richPresence);

Versions: