On Thu, Feb 11, 2010 at 12:26 PM, Peter Zhelezniakov <[email protected]> wrote: > Hi Costantino, > > Costantino Cerbo wrote: >> It works correctly, but only if we don't use the GTK L&F. >> I didn't realise it and this is a very useful clue: it means that we >> do something wrong with the initialization of GTK. >> >> With the GTK L&F, I get these errors: >> Xlib: sequence lost (0x11fae > 0x2233) in reply type 0x1c! >> >> *** glibc detected *** >> /home/c.cerbo/openjdk-awt/jdk/build/linux-i586/bin/java: double free >> or corruption (fasttop): 0x912db9d0 *** >> *** glibc detected *** >> /home/c.cerbo/openjdk-awt/jdk/build/linux-i586/bin/java: double free >> or corruption (out): 0x912d2d10 *** > > I tried again, this time with your newest patch > http://cr.openjdk.java.net/~anthony/7-43-GTKFileDialog-6913179.2/ > > My only change was to start a new thread in GtkFileDialogPeer (see > gtkfd2.patch, attached). It worked with GTK LAF for me, and i wasn't getting > any messages. I was running attached GtkFD.java on a Gentoo box with > gtk+-2.16.6, and was using latest jdk7 sources. > > Could you try my patch and test on your machine? > > Thanks! > -- > Peter > > *** src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java.old Thu Feb 11 > 13:07:16 2010 > --- src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java Thu Feb 11 > 13:07:22 2010 > *************** > *** 84,93 **** > XToolkit.awtLock(); > try { > if (b) { > ! run(fd.getTitle(), fd.getMode(), fd.getDirectory(), > ! fd.getFile(), fd.getFilenameFilter()); > > ! fd.setVisible(false); > } else { > quit(); > fd.setVisible(false); > --- 84,98 ---- > XToolkit.awtLock(); > try { > if (b) { > ! Thread t = new Thread() { > ! public void run() { > ! GtkFileDialogPeer.this.run(fd.getTitle(), > fd.getMode(), fd.getDirectory(), > ! fd.getFile(), fd.getFilenameFilter()); > > ! fd.setVisible(false); > ! } > ! }; > ! t.start(); > } else { > quit(); > fd.setVisible(false); > >
Hi Peter Your patch causes a native assertion error upon clicking "Save": $ java sun.awt.X11.FileDialogTest java: ../../src/xcb_io.c:242: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed. Aborted Clicking "Open" either silently exits or indefinitely hangs (no redraw) both the file dialog and the Java window. Damjan Jovanovic
