Vatuu / discord-rpc

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

Problem #4

Closed wyatt-herkamp closed 5 years ago

wyatt-herkamp commented 6 years ago

java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.UnsatisfiedLinkError: /media/storage/Programming/PersonalProjects/KingTux/null/discord-rpc.jar/discord-rpc.so: /media/storage/Programming/PersonalProjects/KingTux/null/discord-rpc.jar/discord-rpc.so: failed to map segment from shared object at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at net.arikia.dev.drpc.DiscordRPC.loadDLL(DiscordRPC.java:106) at net.arikia.dev.drpc.DiscordRPC.<clinit>(DiscordRPC.java:21) at me.kingtux.kingtux.Main.main(Main.java:30) ... 11 more Exception running application me.kingtux.kingtux.Main Code

package me.kingtux.kingtux;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import net.arikia.dev.drpc.DiscordEventHandlers;
import net.arikia.dev.drpc.DiscordRPC;
import net.arikia.dev.drpc.DiscordRichPresence;
import net.arikia.dev.drpc.callbacks.ReadyCallback;
import javafx.stage.Stage;

import java.util.Scanner;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("window.fxml"));
        primaryStage.setTitle("KingTux.jar");
        primaryStage.setScene(new Scene(root, 600, 275));
        primaryStage.show();
    }

    public static void main(String[] args) {
        System.out.println("Check2");
        DiscordEventHandlers handler = new DiscordEventHandlers();
        handler.ready = new DiscordPresense();
        DiscordRPC.DiscordInitialize("400851884899827714", handler, true);
        DiscordRPC.DiscordRunCallbacks();
        Scanner scanner = new Scanner(System.in);
        launch(args);

    }
}
Vatuu commented 6 years ago

What OS are you using, and what Version?

wyatt-herkamp commented 6 years ago

I am using Fedora(Linux) Version 0.9-beta.4

Vatuu commented 6 years ago

Is the temp library being created in your temp-directory? It should be located in TEMP\discord-rpc\discord-rpc.so

Vatuu commented 6 years ago

If you don't reply until tomorrow noon, I'll close this issue as it does not seem important anymore.

wyatt-herkamp commented 6 years ago

That directory is not created. I am sorry. I forgot.

Vatuu commented 6 years ago

Try updating to version0.9-BETA.6

And tell me if it's still broken.

wyatt-herkamp commented 6 years ago

Still broken. https://paste.ee/p/GGssI All files that are in my project folder. https://paste.ee/p/mSHlP

Vatuu commented 6 years ago

Do you shade the Discord-RPC Artifact?

wyatt-herkamp commented 6 years ago

Yes

Vatuu commented 5 years ago

We were completely unable to reproduce this issue, therefore we can only assume it's an issue with your application or your system environment.

This issue will be closed.

wyatt-herkamp commented 5 years ago

I tried to make a rpc with https://github.com/MinnDevelopment/java-discord-rpc it worked fine.

DeJayDev commented 5 years ago

That's motivating. I'm going to further investigate by attempting to simulate your desktop environment here. Unlocking this because of my own stupid curiosity.

DeJayDev commented 5 years ago

Yeah,

The RPC has completely changed and without an updated code sample I can't help any further, though your issue seems related to #16. Please wait for the proper fix to come out.

This issue will be closed due to version mismatch and a fix is set to go out later today.