evil-mad / stipplegen

Software that can create stipple drawings and “TSP art,” from image files
GNU Lesser General Public License v2.1
422 stars 52 forks source link

Precompiled Stipplegen crashes when Java version is non-numeric #11

Open gerv opened 7 years ago

gerv commented 7 years ago
gerv@wolf:~/Download/StippleGen2$ application.linux64/StippleGen2 
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NumberFormatException: For input string: "9-i"
    at jdk.internal.math.FloatingDecimal.readJavaFormatString(java.base@9-internal/FloatingDecimal.java:2054)
    at jdk.internal.math.FloatingDecimal.parseFloat(java.base@9-internal/FloatingDecimal.java:122)
    at java.lang.Float.parseFloat(java.base@9-internal/Float.java:451)
    at java.lang.Float.<init>(java.base@9-internal/Float.java:532)
    at processing.core.PApplet.<clinit>(PApplet.java:182)

and:

gerv@wolf:~/Download/StippleGen2$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
gerv@wolf:~/Download/StippleGen2$ 

As you can see, it seems like it's trying to parse the Java version number and failing.

This is the version of OpenJDK which comes with Ubuntu 16.04. This may be a bug in the copy of Processing which is embedded in it, I don't know. I tried to get it working from source using the latest Processing - it does - and then generate a newer version using Export Application but I haven't got that working yet - my exported application crashes for a different reason.

oskay commented 7 years ago

I will take a look at this. Please run from within Processing, if possible, in the meantime.