<AWT Dev> Bug 6913179, FileDialog uses native GTK under Linux: first patch
Damjan Jovanovic
damjan.jov at gmail.com
Thu Feb 11 00:33:07 PST 2010
On my setup, with your patches, FileDialogTest.java fails to even start:
$ java sun/awt/X11/FileDialogTest
Exception in thread "main" java.lang.InternalError: Unable to load
native GTK libraries
at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1447)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:531)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:576)
at sun.awt.X11.FileDialogTest.main(FileDialogTest.java:146)
But then jconsole does the same.
Turns out your patches introduce a regression that totally breaks the
GTK LAF for me, since they look for the wrong gthread library name,
causing GTK to fail to load:
+#define GTHREAD_LIB "libgthread-2.0.so"
$ ls /usr/lib/libgthread*
/usr/lib/libgthread-2.0.so.0 /usr/lib/libgthread-2.0.so.0.2200.2
Note the ".0" at the end.
$ strace -f java sun/awt/X11/FileDialogTest
...
[pid 449] open("/lib/tls/i686/cmov/libgthread-2.0.so", O_RDONLY) =
-1 ENOENT (No such file or directory)
[pid 449] open("/lib/tls/i686/libgthread-2.0.so", O_RDONLY) = -1
ENOENT (No such file or directory)
[pid 449] open("/lib/tls/libgthread-2.0.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 449] open("/lib/i686/cmov/libgthread-2.0.so", O_RDONLY) = -1
ENOENT (No such file or directory)
[pid 449] open("/lib/i686/libgthread-2.0.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 449] open("/lib/libgthread-2.0.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
[pid 449] open("/usr/lib/tls/libgthread-2.0.so", O_RDONLY) = -1
ENOENT (No such file or directory)
[pid 449] open("/usr/lib/i686/cmov/libgthread-2.0.so", O_RDONLY) =
-1 ENOENT (No such file or directory)
[pid 449] open("/usr/lib/i686/libgthread-2.0.so", O_RDONLY) = -1
ENOENT (No such file or directory)
[pid 449] open("/usr/lib/libgthread-2.0.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 449] open("/usr/lib/i486-linux-gnu/libgthread-2.0.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
...
This is with the 32 bit Linux Mint 8, but Ubuntu 9.04 has the same problem:
$ ls /usr/lib/libgthread*
libgthread-2.0.so.0 libgthread-2.0.so.0.2000.1
So I don't know where you're testing, that the GTK LAF hasn't regressed.
Otherwise I will test more later.
Thank you for the great work
Damjan Jovanovic
On Fri, Jan 29, 2010 at 1:28 AM, Costantino Cerbo <c.cerbo at gmail.com> wrote:
> Hallo Peter, Hello Anthony,
>
> in the attached patch I take care of all the last Peter's comment.
>
> Unfortunately the problem with the EDT is still there.
>
> 2010/1/28 Anthony Petrov <Anthony.Petrov at sun.com>:
>> What do you mean by "doesn't start"? Doesn't gtk_main() print out any
>> diagnostic output to stderr? Or does it get invoked at all?
> Unfortunately no diagnostic output is printed to stderr... try yourself...
> I've also init the GLib thread system and call gdk_threads_enter() and
> gdk_threads_leave() but the problem remains.
>
> I've no idea how to solve this problem... I've tried also with
> SwingUtilities#invokeLater and SwingWorker...
> I ask again for your help: It would be very nice if some of you can
> address his mind to the solution of this remaining issue... otherwise
> all the work done until now goes lost.
>
> Thanks a lot!
> Costantino
>
More information about the awt-dev
mailing list