Vatuu / discord-rpc

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

ExceptionInInitializerError (winx64) #25

Closed ghost closed 5 years ago

ghost commented 5 years ago

Heyho,

i've saw that the issue i have isn't new. So i opened a new issue.

This happens when i call the initialize Method: Caused by: java.lang.NullPointerException at net.arikia.dev.drpc.DiscordRPC.copyFile(DiscordRPC.java:204) at net.arikia.dev.drpc.DiscordRPC.loadDLL(DiscordRPC.java:144) at net.arikia.dev.drpc.DiscordRPC.<clinit>(DiscordRPC.java:16) ... 48 more

I've deleted all discord-rpc files and directories in my temp folder. Thanks for help

DeJayDev commented 5 years ago

Mind providing me your OS and architecture? You can find out by running winver in Run or Command Prompt.

ghost commented 5 years ago

Windows 8 Version 6.3 (Build 9600)

DeJayDev commented 5 years ago

I believe I also asked for your architecture, but I think it's safe to assume x84.

Can you try to replicate this error whilst running on this version: Maven:

<dependency>
    <groupId>com.github.Vatuu</groupId>
    <artifactId>discord-rpc</artifactId>
    <version>373e8bb78f</version>
</dependency>

Gradle:

implementation 'com.github.Vatuu:discord-rpc:373e8bb78f'

Edit: Don't forget to ensure your Temp discord-rpc folder is gone

ghost commented 5 years ago

Wait. How i can reproduce the error when i only implement it?

DeJayDev commented 5 years ago

Update and try to use your implementation again.

ghost commented 5 years ago

So, i've updated it in my maven project and in the associated gradle project. Doesn't matter how i import my maven project, i get a "NoClassDefFoundError" for the DiscordEventHandlers or for a class of my maven project, i need to use :/

DeJayDev commented 5 years ago

It appears you were running an older version, can you follow the README file to learn how to get a basic setup running? Chances are things will work out though.

ghost commented 5 years ago

I've followed the steps of the README file. As i wanted to test it, i've got the error from my first comment

DeJayDev commented 5 years ago

Let's see some code, https://hastebin.com

I can't quite put my finger on the issue

ghost commented 5 years ago

That's the code of the maven project: https://hastebin.com/azehulihiv.java In my gradle project i've added the .jar as a jar to my dependencies. In my build.gradle i've added it to my dependencies. So, i've tested it now and got the same error from my first comment.

Vatuu commented 5 years ago

@Speedy2kJan Please show me your build.gradle.

Vatuu commented 5 years ago

Seeing how this is already ~3 months old without a response, I will ask you to update on this until tomorrow, otherwise, I will consider this as not important anymore and close it.

Dragovorn commented 5 years ago

Don't close the issue! Both of my testers are encountering this issue on their machines, so I can provide updates.

After following this thread it still remains unresolved (I do not have the issue which makes it even more perplexing)

I'll provide my pom.xml (https://github.com/Dragovorn/courier/blob/master/pom.xml also if you need to look at any more of the code it's all in that repo)

I'll attach the log file being sent to me by the end user as well. 2019-02-01-0.log

Another interesting thing I noted is that the file created in the discord-rpc folder under temp is 0 bytes, and it overwrites pre-existing binaries aswell.

Both users are running Windows 10 x64.

Vatuu commented 5 years ago

Hm, do you have discord? I think we need to work on this a bit more dynamic

Dragovorn commented 5 years ago

I do, Dragovorn#9617