|
Replies:
32
-
Last Post:
Feb 4, 2010 3:40 AM
by: danny0085
|
|
|
|
|
|
|
Swing/AWt under Compiz
Posted:
Nov 16, 2007 6:24 AM
|
|
|
Hi,
I have a bug 6429775 (Xgl/Compiz/Java 1.5/Swing problem) which I considered fixed (long time ago), but according to comments on this bug we still have some problems under Compiz  I've tried NB 6rc1+jdk6u3 but everything looks ok on my Ubuntu 7.10  So, I wonder if someone on this forum has experienced the problem and if yes, it would be nice to know how the problem can be reproducible (and in what environment)
Thanks in advance, Oleg.
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 18, 2007 9:42 AM
in response to: oleg_sukhodolsky
|
|
|
Please try to open dialogs many time on NetBeans 6.0 rc1. For example, you try to open following steps many time: tools -> NetBeans Platforms -> close, tools -> Java Platforms -> close, tools -> Ruby Gems -> close ...
Not always, but sometimes dialog is broken. I hope you can reproduce this.
My environment is following: OS: Ubuntu 7.10 Java: 1.6.0_03 NetBeans: 6.0 rc1
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 19, 2007 1:39 AM
in response to: daigo_k
|
|
|
thank you for information. It looks like we have a thread race there  Will study the code and work under Compiz
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 20, 2007 3:12 AM
in response to: daigo_k
|
|
|
I will not reopen the bug, but I've filed new one - #6632124 (will be visible soon). I do not want to reopen old one because it was already integrated/verified, and it does really improve the situation (w/o it I was able to reproduce the problem every time I start NB)
Regards, Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 21, 2007 1:35 PM
in response to: oleg_sukhodolsky
|
|
|
Thank you for working on this problem. Java has been seriously broken under Linux/compiz for a long time.
I'm running compiz fusion under Fedora 7 (32bit) on AMD X2 6000+.
Under Java 6 update 3: do 'export AWT_TOOLKIT=MToolkit', run Netbeans 6, press CTRL-O to open to "Go to Type" window, press ESC to dismiss it. Keyboard input no longer works.
Without AWT_TOOLKIT set, it works better but still has occasional blank or screwed up windows. (By screwed up, I mean wrong placement (often top left corner of screen instead of center), wrong size (often very large), blank or partial content (often only a small section of the content in the top left corner is visible, the rest of the window is blank.)) Press CTRL-O or CTRL-H, then ESC several times. You should see the corruption within about 10 tries or so.
Under Java 5 update 13: With AWT_TOOLKIT unset, run netbeans 6. All you get is a blank window. This happens every time.
With AWT_TOOLKIT=MToolkit, Netbeans 6 mostly works, however, some of the popups do not display, for example, CTRL-TAB to cycle through the files in the editor does not show the popup list of filenames. Also, when you click on the colored bars for local history on the left side of the editor window, the popup toolbar does not display.
I have also applied the sed -i 's/XINERAMA/FAKEEXTN/g' hack if that matters.
While having Java 6 fixed would be nice, I have to target Java 5 when developing software. It'd be nice to have a solution that worked for both versions.
I'd be glad to help if I can.
-Vic ICQ: 1375882 AIM: vicricker
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Nov 22, 2007 1:18 AM
in response to: vicricker
|
|
|
Hi Vic, > Under Java 6 update 3: > do 'export AWT_TOOLKIT=MToolkit', run Netbeans 6, > press CTRL-O to open to "Go to Type" window, press > ESC to dismiss it. Keyboard input no longer works.
I'm not sure if we will fix bug in MToolkit :(actually we have just removed it in jdk7 
> Without AWT_TOOLKIT set, it works better but still > has occasional blank or screwed up windows. (By > screwed up, I mean wrong placement (often top left > corner of screen instead of center), wrong size > (often very large), blank or partial content (often > only a small section of the content in the top left > corner is visible, the rest of the window is blank.)) > Press CTRL-O or CTRL-H, then ESC several times. You > should see the corruption within about 10 tries or > so.
this is what I want to fix. The problem is that in my environment it is much harder to reproduce the problem From the other hand this means that it will be even more interesting to find and fix the problem 
> Under Java 5 update 13: > With AWT_TOOLKIT unset, run netbeans 6. All you get > is a blank window. This happens every time.
this is because even original fix for 6429775 was not back-ported to 5.0, and I doubt it will be unless someone (who has support contract) will escalate it. My target is jdk 7.0 and jdk 6.0uX.
> With AWT_TOOLKIT=MToolkit, Netbeans 6 mostly works, > however, some of the popups do not display, for > example, CTRL-TAB to cycle through the files in the > editor does not show the popup list of filenames. > Also, when you click on the colored bars for local > history on the left side of the editor window, the > popup toolbar does not display. > > I have also applied the sed -i > 's/XINERAMA/FAKEEXTN/g' hack if that matters.
Hope the problem with Xinerama will be also fixed in 6uX soon.
> While having Java 6 fixed would be nice, I have to > target Java 5 when developing software. It'd be nice > to have a solution that worked for both versions.
As I said, my target is 7.0 and 6.0uX.
Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Nov 27, 2007 11:45 AM
in response to: oleg_sukhodolsky
|
|
|
> Hi Vic, > > > Without AWT_TOOLKIT set, it works better but still > > has occasional blank or screwed up windows. (By > > screwed up, I mean wrong placement (often top left > > corner of screen instead of center), wrong size > > (often very large), blank or partial content > (often > > only a small section of the content in the top > left > > corner is visible, the rest of the window is > blank.)) > > Press CTRL-O or CTRL-H, then ESC several times. > You > should see the corruption within about 10 tries or > so. > this is what I want to fix. The problem is that in > my environment it is much harder > to reproduce the problem From the other hand > this means that it will be even more interesting > to find and fix the problem  > > Oleg.
Hi. Are you not able to reproduce the problems with Netbeans?
I'm not sure if this is related but, one oddity that I've noticed, which seems to happen consistently, is with the replace dialog opening in the wrong location: 1. Press CTRL-H to open the Replace dialog 2. Press ESC to dismiss it. 3. Repeat several times
Even if the replace dialog paints correctly, it will still crawl up the screen every time it opens until it gets to the top of the screen. Weirder still, this doesn't happen with CTRL-O. I thought it might be a problem with Netbeans but the problem does not happen under JDK5+MToolkit.
I also tried to use the Metal LaF under JDK 6 (Netbeans defaults to the system default. Gnome?) but it didn't seem to make a difference.
It's unfortunate that it's only being fixed in Java 6+ since that's not available for Mac yet but I understand.
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Dec 5, 2007 1:26 AM
in response to: vicricker
|
|
|
> Are you not able to reproduce the problems with > Netbeans?
I've seen the problem just couple times 
> I'm not sure if this is related but, one oddity that > I've noticed, which seems to happen consistently, is > with the replace dialog opening in the wrong > location: > 1. Press CTRL-H to open the Replace dialog > 2. Press ESC to dismiss it. > 3. Repeat several times > > Even if the replace dialog paints correctly, it will > still crawl up the screen every time it opens until > it gets to the top of the screen. Weirder still, > this doesn't happen with CTRL-O.
I see the problem, will investigate if this is AWT bug.
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Dec 11, 2007 1:41 AM
in response to: vicricker
|
|
|
> I'm not sure if this is related but, one oddity that > I've noticed, which seems to happen consistently, is > with the replace dialog opening in the wrong > location: > 1. Press CTRL-H to open the Replace dialog > 2. Press ESC to dismiss it. > 3. Repeat several times > > Even if the replace dialog paints correctly, it will > still crawl up the screen every time it opens until > it gets to the top of the screen. Weirder still, > this doesn't happen with CTRL-O. I thought it might > be a problem with Netbeans but the problem does not > happen under JDK5+MToolkit.
I've investigated this issue and found that, most likely, this is a Compiz bug. So, I've filed bug against Compiz: http://bugs.freedesktop.org/show_bug.cgi?id=13589
Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 21, 2007 2:27 PM
in response to: oleg_sukhodolsky
|
|
|
Hi,
Thanks for looking at this. It's a real show-stopper for VASSAL, the open-source Java board game engine for which I'm one of the developers. We have a pretty sizable Linux community and many of them (myself included) want to use Beryl, Compiz, or Compiz Fusion.
Here's a short program which is supposed to load an image (the path of which is given on the command line) and display it in a scroll pane. If I use Compiz Fusion and I choose anything but a tiny image, the image doesn't display, and regardless of the image chosen I get no scroll bars or window decorations.
import java.awt.Image; import java.awt.Toolkit; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JRootPane; import javax.swing.JScrollPane;
public class Test { public static void main(String[] args) { final Image im = Toolkit.getDefaultToolkit().createImage(args[0]);
final JLabel label = new JLabel(new ImageIcon(im)); final JScrollPane scroll = new JScrollPane(label); final JFrame frame = new JFrame(); frame.add(scroll); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } }
For comparison, this works regardless of the image chosen when I use Metacity as my window manager.
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Nov 22, 2007 12:34 AM
in response to: uckelman
|
|
|
I see such problem with 1.6.0, but not with 1.6.0_02. What version of java do you use?
|
|
|
|
|
|
|
|
Re: Swing/AWT under Compiz
Posted:
Nov 25, 2007 9:41 AM
in response to: oleg_sukhodolsky
|
|
|
This happens for me using 1.7.0-icedtea. With 1.6.0_03 and Compiz Fusion, it fails for me in a different way:
java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed. Aborted
|
|
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 23, 2007 1:37 AM
in response to: oleg_sukhodolsky
|
|
|
Hi Oleg,
This bug can be reproduced on a fresh install of Ubuntu 7.10 "Gutsy Gibbon", with the following settings:
System->Preferences->Appearance->Visual Effects->Normal or Extra
Along with the following application: Visual Paradigm for UML 6.1 (Visual Paradigm Suite 3.1) http://www.visual-paradigm.com/download/download.jsp?product=vpsuite (either use the 30 day trial or the community edition).
This is using java-6-sun-1.6.0.03 installed via Ubuntu's Synaptic Package Manager.
There is nothing special with this installation, everything is out of the box with no tinkering (I installed it all today from scratch).
The issue manifests itself when you initially execute VP-UML, a dialog opens which should ask you which workspace you want to use, but with the Normal/Extra visual effects selected all you get is a blank gray box... the invisible buttons still work however. If you change the visual effects setting to None everything works fine.
It should be noted that setting "AWT_TOOLKIT=MTookkit" results in the dialog box displaying properly, however I haven't been able to demonstrate that this has no side effects on VP-UML yet.
I hope that helps, Carl C.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 23, 2007 1:56 AM
in response to: rinsewin
|
|
|
Hi Carl,
thank you for information. Just one more question: is the problem reproducible always with this tool?
Thanks, Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 23, 2007 2:28 AM
in response to: rinsewin
|
|
|
Hi Carl,
I've tried to install VP and it looks like it uses its own jre for this and this jre doesn't work well under Compiz (not a big surprise How can I force VP to use another JRE?
Thanks, Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 23, 2007 7:40 PM
in response to: oleg_sukhodolsky
|
|
|
Hi Oleg,
I'm not sure of a clean way of forcing VP to use a different JRE, however I did try the brute force approach i.e.
% cd <install dir>/VP_Suite3.1 % mv jre <install_dir>/tmp % cp /usr/lib/jvm/java-6-sun/jre <install_dir>/VP_Suite3.1
Interestingly this resolved the issue under compiz!!! So, it would appear that VP is shipping with a broken version of the JRE (in this case: v5/1.5.0) and its _not_ Java 6 that is causing the issue.
People experiencing this issue with other apps might want to check whether the above brute force workaround applies.
Good catch Oleg, I'll contact the VP developers and point them to this thread.
Thanks, Carl C.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Nov 24, 2007 1:05 AM
in response to: rinsewin
|
|
|
I'm happy to hear that your problem is resolved (if was one the easiest fix for me 
Let me know if you find another problem.
Good luck, Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Dec 4, 2007 10:10 AM
in response to: oleg_sukhodolsky
|
|
|
Hi Oleg!!
I agree with vicricher on all.
Another test case:
1.7.0-ea-b23 + NB 5.5 has no JDialog problems (never!) but the IDE suddenly freezes with a simple refactoring (strace: futex(0xb7dccbd8, FUTEX_WAIT, 30596, NULL.. ) Maybe this issue can be solved more easily.
And.. sorry about my english.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Jan 30, 2008 12:07 AM
in response to: oleg_sukhodolsky
|
|
|
I also have this problem with JRE 1.6.0_03-b05. I am trying to run the java program at http://adornthetruth.com/nikamo . I am also running Ubuntu 7.10 and compiz (1:0.6.0)/fusion(0.5.2). It will randomly make a JFrame completely gray. Most of the time the window/frame shows up fine, but about 30% of the time one of the windows will appear with nothing on it.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Apr 4, 2008 3:52 PM
in response to: kojow7
|
|
|
I can also confirm that this works with Ubuntu 8.04. Sigh. BTW, if anyone is testing this bug and needs the source for the above program you can add /source to the above address. Is there anyone that never runs into this problem running both java and compiz? I would have thought that there'd be a lot more requests to have this bug fixed especially since compiz is now default on Ubuntu.
|
|
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Feb 20, 2008 3:24 PM
in response to: oleg_sukhodolsky
|
|
|
Hi Oleg, there have been quite a few ubuntu bugs - most of them are now marked as duplicates of this one https://bugs.launchpad.net/fedora/+bug/118983 I can reproduce this most of the time using intellij idea 7 on java 1.6.0_03, ubuntu 7.10. The easiest way is just to open a java file, put the cursor on a public method, and hit alt-f7 to get the "find usages dialog" - at least one time out of 4 this comes up blank for me. Intellij provides a free download with evaluation period here http://www.jetbrains.com/idea/download/index.html#linux any chance you could try that and see if you can reproduce the problem? Thanks
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Feb 21, 2008 1:16 AM
in response to: davie
|
|
|
Hi you all, I'm happy to find and join the discussion. I've used Ubuntu to realize my first application for an university course. It works, pretty good to be honest, but some times (in my opinion too times...) it missing the size of the JDialog, JOptionPane appear empty and other strange thing (wrong position, missing component like buttons, JTables, etc...). I use only gedit and jdk6.0.
Regards
Maurizio
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Apr 10, 2008 8:44 PM
in response to: cayuyon
|
|
|
> Good news (maybe): > > Trying jdk7 snapshot build 25 > > http://download.java.net/jdk7/binaries/ > > And everything seems ok. Any confirmation?
How compatible is this version with Eclipse, Netbeans and other existing java tools?
Erik.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Apr 10, 2008 9:30 PM
in response to: eputrycz
|
|
|
It should be compatible (at least it works fine with NB6.0 for me)
But I would not be so optimistic about disappearing the problem. It is a thread race and I will not consider it is fixed until I will know for sure the root cause of the problem.
Oleg.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Apr 10, 2008 10:16 PM
in response to: oleg_sukhodolsky
|
|
|
Compatible and apparently stable with NB 5.5.1
Some recurrent problems with window position and gray screens dissapears for me. 1 day of testing.
|
|
|
|
|
|
|
|
Re: Swing/AWt under Compiz
Posted:
Apr 11, 2008 12:09 PM
in response to: cayuyon
|
|
|
I could not reproduce the blank window in about an hour of work with Netbeans under Java 7! Very nice! Unfortunately, there were other problems, tooltips didn't work, the memory meter in the toolbar didn't work, the status bar in the bottom right, that shows when the project is running, or when NB is doing something, would not clear, or maybe the tasks never completed?
I hope the fixes get backported to Java 5 & 6.
|
|
|
|
|