Processing crashes on startup

edited July 2016 in Using Processing

I just downloaded the 3.1.1 version of Processing but I can't get it to run. It crashes on startup. I see the splash screen and immediately after I see a NullPointerException error message. I also see this on the console:

err is java.lang.NoSuchMethodError: processing.data.StringList.([Ljava/lang/Object;)V

the exception is:

java.lang.NullPointerException at processing.app.Base.buildCoreModes(Base.java:357) at processing.app.Base.(Base.java:273) at processing.app.Base.createAndShowGUI(Base:201) ....

I tried eliminating the .processing directory, which contains the preferences.txt file. I read elsewhere that eliminating that can fix some startup problems. This didn't work in this case though.

This works just fine on my other computer but I can't figure out what is different. Any suggestions?

Answers

  • I found this issue on github:

    https://github.com/processing/processing/issues/4128

    Same exact error message. Glad I am not alone.

  • Answer ✓

    I found the reason and a solution!

    The problem was my Java CLASSPATH. For reasons related to a project I did a few years ago, I had a set of Processing jar files (probably 2.2.1) in a directory that was always in my CLASSPATH. I realize now that this is not a good idea but it made sense at the time.

    When the Processing startup script runs it adds its own files and directories to the end of the CLASSPATH before launching the application. Since my other set of Processing jar files were ahead of the correct jar files, the JRE would load classes from those jars first. Not surprisingly, that is bad for Processing.

    To fix it, I simply had to simply remove my addition to my CLASSPATH. It worked right away after that.

Sign In or Register to comment.