FileChooser in Ubuntu 16.04


I upgraded my dev vm to Ubuntu 16.04 today, and immediately afterward noticed the FileChooser is no longer working. Here is the code I’m using from within a buttonClicked() inherited from Button::Listener:

FileChooser chooser( "Open Image", previous_directory, "*.JPG;*.jpg" );
const bool result = chooser.browseForFileToOpen();

That 2nd line hangs forever without ever showing the file dialog. Debugging into it, I see it is hung up on this line in juce_posix_SharedCode.h: read() line 1157:

return (int) fread (dest, 1, (size_t) numBytes, readHandle);

I tried the JuceDemo, and it also hangs in the same place when I click on any of the “Load”, “Choose”, or “Save” buttons on the Dialog Boxes tab. If I disable “Use Native Windows”, then they all work fine.

Anyone else seeing this behaviour on Ubuntu 16.04?


Now that I’ve caught up on the forum, I see I’m not the only one complaining about native FileChooser dialog windows hanging. Apparently a fix is available in a private branch somewhere. Will use non-native dialog boxes until then.


the Development branch has included the fix already ( git clone -b develop )
see this thread as well.