Can't get Jucer to open files on Linux


#1

I'm Running Ubuntu 14.04 (xubuntu) and can't get the open dialogue of the introjucer to work. The Introjucer compiled just fine, but trying to open or create a project causes the program to hang. 

 

Juce is 3.0.8, and Introjucer is 3.1.0. I stopped the program after it seemed to hang and ran bt (I'm relatively new to programming on linux, so if you want anything else, just let me know.)

 gdb ./Introjucer 
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
./Introjucer: No such file or directory.
(gdb) 
[1]+  Stopped                 gdb ./Introjucer
ryan@Sclera:~$ cd Programming/Juce/extras/Introjucer/Builds/Linux/build/
ryan@Sclera:~/Programming/Juce/extras/Introjucer/Builds/Linux/build$ gdb ./Introjucer 
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Introjucer...done.
(gdb) run
Starting program: /home/ryan/Programming/Juce/extras/Introjucer/Builds/Linux/build/Introjucer 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
JUCE v3.0.8

**********************************************************
Introjucer 3.1.0  ---  Build date: Sep  9 2014
Log started: 9 Sep 2014 5:53:09pm

[New Thread 0x7ffff515a700 (LWP 7859)]
^Z
Program received signal SIGTSTP, Stopped (user).
0x00007ffff64cc36d in read () at ../sysdeps/unix/syscall-template.S:81
81    ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0  0x00007ffff64cc36d in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff645b120 in _IO_new_file_underflow (fp=0xcc45c0) at fileops.c:613
#2  0x00007ffff6459f18 in __GI__IO_file_xsgetn (fp=0xcc45c0, 
    data=<optimized out>, n=512) at fileops.c:1418
#3  0x00007ffff644f3bf in __GI__IO_fread (buf=<optimized out>, size=1, 
    count=512, fp=0xcc45c0) at iofread.c:42
#4  0x00000000005e4399 in juce::ChildProcess::ActiveProcess::read (
    this=0xcc2430, dest=0x7fffffffcdc0, numBytes=512)
    at ../../../../modules/juce_core/native/juce_posix_SharedCode.h:1082
#5  0x00000000005c6bbe in juce::ChildProcess::readProcessOutput (
    this=0x7fffffffd0b0, dest=0x7fffffffcdc0, numBytes=512)
    at ../../../../modules/juce_core/threads/juce_ChildProcess.cpp:39
#6  0x00000000005c6cff in juce::ChildProcess::readAllProcessOutput (
    this=0x7fffffffd0b0)
    at ../../../../modules/juce_core/threads/juce_ChildProcess.cpp:73
#7  0x0000000000798bd6 in juce::FileChooser::showPlatformDialog (results=..., 
    title=..., file=..., filters=..., isDirectory=false, isSave=false, 
    selectMultipleFiles=false)
    at ../../../../modules/juce_gui_basics/native/juce_linux_FileChooser.cpp:179
#8  0x0000000000728ed5 in juce::FileChooser::showDialog (this=0x7fffffffdc70, 
    flags=5, previewComp=0x0)
    at ../../../../modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp:109
---Type <return> to continue, or q <return> to quit---
#9  0x0000000000728c37 in juce::FileChooser::browseForFileToOpen (
    this=0x7fffffffdc70, previewComp=0x0)
    at ../../../../modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp:45
#10 0x000000000041a2f7 in IntrojucerApp::askUserToOpenFile (this=0xc85dd0)
    at ../../Source/Application/jucer_Application.h:429
#11 0x000000000041a1b9 in IntrojucerApp::perform (this=0xc85dd0, info=...)
    at ../../Source/Application/jucer_Application.h:402
#12 0x00000000007917a4 in juce::ApplicationCommandTarget::tryToInvoke (
    this=0xc85de8, info=..., async=false)
    at ../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp:67
#13 0x00000000007c8fbb in juce::ApplicationCommandTarget::CommandMessage::messageCallback (this=0xcf7c10)
    at ../../../../modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp:36
#14 0x0000000000626b83 in juce::InternalMessageQueue::dispatchNextInternalMessage (this=0xc78610)
    at ../../../../modules/juce_events/native/juce_linux_Messaging.cpp:202
#15 0x0000000000626573 in juce::InternalMessageQueue::dispatchNextEvent (
    this=0xc78610)
    at ../../../../modules/juce_events/native/juce_linux_Messaging.cpp:95
#16 0x00000000006241ad in juce::MessageManager::dispatchNextMessageOnSystemQueue (returnIfNoPendingMessages=false)
---Type <return> to continue, or q <return> to quit---
    at ../../../../modules/juce_events/native/juce_linux_Messaging.cpp:388
#17 0x000000000062057d in juce::MessageManager::runDispatchLoopUntil (
    this=0xc78510, millisecondsToRunFor=-1)
    at ../../../../modules/juce_events/messages/juce_MessageManager.cpp:99
#18 0x000000000062050b in juce::MessageManager::runDispatchLoop (this=0xc78510)
    at ../../../../modules/juce_events/messages/juce_MessageManager.cpp:86
#19 0x000000000061fbaf in juce::JUCEApplicationBase::main ()
    at ../../../../modules/juce_events/messages/juce_ApplicationBase.cpp:240
#20 0x000000000061fac6 in juce::JUCEApplicationBase::main (argc=1, 
    argv=0x7fffffffdf98)
    at ../../../../modules/juce_events/messages/juce_ApplicationBase.cpp:218
#21 0x00000000004170dc in main (argc=1, argv=0x7fffffffdf98)
    at ../../Source/Application/jucer_Main.cpp:27
(gdb) 

#2

Looks like it's trying to open a file browser like zenity, but it's failing for some reason. Not sure what to suggest, I've not seen that problem before..


#3

Switching to normal Ubuntu, it works fine. Something about Xubuntu seems to throw it off. Anyone else have any trouble with Xubuntu, or any idea where to look for what the difference is?


#4

Which desktop environment do you use on Xubuntu?


#5

This may be misunderstanding your question (as I mentioned before, I'm relatively new to linux), but I get the same problem with an xfce session and a xubuntu session.


#6

I also have the same issue with KDE.

I have changed the ctor in the juce_FileChooser.h:

    FileChooser (const String& dialogBoxTitle,
                 const File& initialFileOrDirectory = File::nonexistent,
                 const String& filePatternsAllowed = String::empty,
                 bool useOSNativeDialogBox
#ifdef JUCE_LINUX
                 = false);
#else
                 = true);
#endif

It's just a workaround - recompile the Introjucer and everything works fine.


#7

Whenever one tries to open a native file selection dialog, any Juce application simply hangs. I can only kill it via SIGTERM. You can alsO reproduce this in the JUCE demo application.

Seems a pretty severe bug to me, since it makes Introducer unusable on such systems, unless you make the change monotomy proposes. I compiled Juce from latest git and it's still present. Should this be reported somewhere else to get it fixed?


#8

Some more observations on this bug:

When I run the JuceDemo, go to Components: Dialog Boxes, select "Use Native Windows" and then click on e.g. "'Load' File Browser", the application hangs and no file browser opens. When I look at the list of processes with 'ps xww', however, I see the following:

18424 pts/1    Sl+    0:03 ./JuceDemo
18434 pts/1    Sl+    0:00 zenity --file-selection --title=Choose a file to open... --multiple --separator=: --filename=Demo 2>/dev/null

So zenity is apparently called in a child process but doesn't open the file selection window. If I execute the zenity command line shown above manually (with proper quoting and without the redirection of stderr), zenity opens normally, though it spits out some warning messages on stderr.

$ zenity --file-selection "--title=Choose a file to open..." --multiple --separator=: --filename=Demo

** (zenity:18550): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(zenity:18550): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(zenity:18550): Gtk-WARNING **: Symbolic icon drive-harddisk-symbolic of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon document-open-recent-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-pictures-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-documents-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-download-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-music-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-videos-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon drive-harddisk-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon media-eject-symbolic-ltr of size 16 is in an icon theme directory of size 96

(zenity:18550): Gtk-WARNING **: Symbolic icon folder-symbolic-ltr of size 16 is in an icon theme directory of size 96

 

If I kill the zenity child process from JuceDemo, the application is responsive again.