# Processing crashes after file selection dialog

**URL:** <https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431>\
**Category:** Processing\
**Created:** [July 2, 2018, 10:56am UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431 "2018-07-02T10:56:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://discourse.processing.org/u/roy)\
**Post date:** [July 2, 2018, 10:56am UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/1 "2018-07-02T10:56:34Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [July 2, 2018, 9:05pm UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/2 "2018-07-02T21:05:47Z")

</div>

My first suggestion is to check what java you have installed. Try this [java version](http://www.codebind.com/linux-tutorials/find-java-version-ubuntu-16-04-lts-linux/)?

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

Kf

---

<div class="post-metadata">

**Author:** ![roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@roy](https://discourse.processing.org/u/roy)\
**Post date:** [July 3, 2018, 12:35pm UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/3 "2018-07-03T12:35:43Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [July 4, 2018, 4:36pm UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/4 "2018-07-04T16:36:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [March 30, 2019, 9:56pm UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/5 "2019-03-30T21:56:42Z")

</div>

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

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`?

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [March 31, 2019, 10:21am UTC](https://discourse.processing.org/t/processing-crashes-after-file-selection-dialog/1431/6 "2019-03-31T10:21:39Z")

</div>

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`?
