Berikai / bitwig-theme-editor

A theme editor for Bitwig Studio, written educational purpose in mind!
MIT License
93 stars 7 forks source link

java.lang.NullPointerException #10

Closed sleeplessKomodo closed 2 weeks ago

sleeplessKomodo commented 2 weeks ago

Amazing stuff, by the way, I've been waiting so long for the Bitwig devs to implement this, thanks Berikai~

What I tried: I ran the following command (in a directory containing the theme file (one I made using your handy theme editor) and the theme editor .jar)

java -jar bitwig-theme-editor-1.4.0.jar /opt/bitwig-studio/bin/bitwig.jar apply theme_BitwigDracula.json

after which, I ran the same command with sudo, but the result was the same.

Here's the theme file, just in case there's something wrong with it. (I'm no json or theming expert): theme_BitwigDracula.json

and here's the error message in full:

Exception in thread "main" java.lang.NullPointerException: Cannot read field "methods" because "this.classNode" is null
    at dev.berikai.BitwigTheme.core.HashCheckClass.disableHashCheck(HashCheckClass.java:34)
    at dev.berikai.BitwigTheme.Main.applyTheme(Main.java:102)
    at dev.berikai.BitwigTheme.Main.main(Main.java:58)

bitwig-studio (v4.4) works without issue My java version is --> openjdk 22.0.1

Berikai commented 2 weeks ago

Can you provide more information about how can this issue be reproduced? It seems like you have tried to theme an older version of Bitwig Studio (probably older than v4.4) which this theme editor couldn't support.

Which version of Bitwig Studio gives this error?

Berikai commented 2 weeks ago

Also, just tested the json file you've created and it works fine!

sleeplessKomodo commented 2 weeks ago

as far as I can tell, it's version 4.4

Screenshot_20240709_225329

Berikai commented 2 weeks ago

It seems like Bitwig Theme Editor 1.3.0 and newer versions don't support applying themes on Bitwig Studio 4.4 due to a breaking change made in the code.

You can try to use Bitwig Theme Editor 1.2.0 for now.

Please keep in mind that 1.2.0 and older versions may trigger Bitwig's integrity check and cause the SOS melody. Back up your bitwig.jar, just in case.

sleeplessKomodo commented 2 weeks ago

Yes, using the theme editor version 1.2.0 worked without a problem. I backed up the bitwig.jar, so hopefully it's smooth sailing from here, thanks for the help!