Processing crashes after file selection dialog

OS: Ubuntu 18.04
Processing version: 3.3.7

When I start processing and go to File>Open, two things happen:

  1. The dialog doesn’t detect any pde files
  2. When I close the dialog box, processing crashes with this in the console:
xception in thread "Thread-5" java.lang.NullPointerException
	at java.io.File.<init>(File.java:277)
	at sun.awt.X11.GtkFileDialogPeer.filenameFilterCallback(GtkFileDialogPeer.java:105)
	at sun.awt.X11.GtkFileDialogPeer.run(Native Method)
	at sun.awt.X11.GtkFileDialogPeer.showNativeDialog(GtkFileDialogPeer.java:174)
	at sun.awt.X11.GtkFileDialogPeer.access$000(GtkFileDialogPeer.java:38)
	at sun.awt.X11.GtkFileDialogPeer$1.run(GtkFileDialogPeer.java:116)

However it works fine when I open the pde files directly from the file manager/terminal. How can I solve this issue?
All help appreciated. Thanks

My first suggestion is to check what java you have installed. Try this java version?

Was it working before or is the first time running Processing in this machine?

Kf

This is the first time I’m running Processing on this computer. Used to have it on Ubuntu 14.04 without problems

running java -version gave me

Command 'java' not found, but can be installed with:

sudo apt install default-jre            
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless 

which is confusing since processing does ultimately run when I start it using the pde file

Processing by default ships with its own bundled JDK - inside the java folder in the Processing folder.

You could install openjdk-8, rename the existing java folder to eg. old-java, and add a symlink to run on OpenJDK. I have this on my 16.04 machine with java linked to /usr/lib/jvm/java-8-openjdk-amd64/. Will probably be the same for you.

This will at least narrow down whether it’s a problem with the Oracle JDK that Processing ships with.

1 Like

This is very strange. Now I have exactly the same issue :frowning:

I don’t remember updating anything when this started today. The ArchLinux package shows this problem for me (which uses the system openjdk java), and also the binary downloaded from the Processing (which should use its own java). Both current and previous versions.

If I don’t try to load a file it works fine. I can type code, run it, save it. Load recent sketches. It seems like there’s a problem with the load file dialog. Once triggered it freezes and I must killall -9 java to close it.
Could it be that something changed in the GtkFileDialog?

As a workaround: open preferences.txt and replace

chooser.files.native=true

with

chooser.files.native=false

Then the open dialog is usable.

Could any Linux users try with that setting set to true see what happens when you go to File > Open and press ESC?