compiz & java windows always grey

Bug #118983 reported by hiro
234
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Fedora
Fix Released
Medium
beryl-core (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Intrepid by davie
sun-java6 (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Intrepid by davie

Bug Description

Binary package hint: beryl-core

If I have compiz or beryl on, all java (I think swing) windows that I open are completely grey.. I have a nvidia 6050LE on amd64 with ubuntu 7.04(64bit)

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

Description of problem:

This is a known bug in Sun Java, I think we can do very little, I'm just posting
it here with a small workaround so that other people can find it easily and run
java programs until a fix is released from Sun.

The problem is that Swing applications with Sun Java do not work with Compiz and
Desktop effects enabled.

On the net there are a couple of workaround available, but I have found only one
works with fedora core 6.

One suggest to use MToolkit instead of the XToolKit:

export AWT_TOOLKIT=MToolkit

But this requires a library I was not able to find in fedora core 6 (it was in
the x11-deprecated-libs, but now this package seems to be removed).

The one that works with fedora is to install Xephyr and run java programs inside
Xephir, with metacity or another window manager that is not compiz, like the
following snippet shows:

--- cut ---
#! /bin/bash
# run_java.sh
Xephyr :2 -ac -screen 1430x850 &
metacity --display :2 &
export DISPLAY=:2
$1 &
--- cut ---

Just Create a file named run_java.sh with this content, Then just run
./run_java.sh netbeans or ./run_java.sh limewire and you will get a java program
into a Xephyr session, just change -screen values to suite your needs.

While this is a less than optimal solution, it works.

The last workaround is to disable compiz and desktop effects and use metacity
but it is really difficult to come back to the old desktop after you have tried
compiz :)

Version-Release number of selected component (if applicable):

Sun Java, at least from version 1.5.0_05 to 1.5.0_09 and 1.6.0 beta 2; IBM Java
1.5.0 update 3. Other JDK may have the same issues.

How reproducible:

Always, with compiz, some Swing based applications seem to work, but they froze
as soon as the user tries to resize the window.

Steps to Reproduce:
1. enable compiz
2. run a swing application

Actual results:
The application shows a grey windows, froze or does not resize (eventually
stopping to work)

Expected results:
Applications should start and work normally

Additional info:
GCJ seems to work, GNU classpath with Cacao also works. This is a bug in Sun
Java. SWT application are not affected. I have not tested AWT but it seems to
work, too (this is what I've read on the net, at least).

This is a bug enty in Sun Bugzilla that can be tracked:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6429775

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

I wanted to add that first workaround proposed (the MToolkit fix), can be
enabled for fedora by installing the package libXp.

I have tested netbeans with this fix and seem to run fine on jdk 1.6 rc and jdk
1.5.0_09, but limewire does not run, maybe other application have issues...

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

The jdk 1.6.0-u1 (officially released) works with compiz, I've not tested it
with beryl (I know there is a workaround for 1.6, but I don't know if it is
still valid/needed).

Revision history for this message
Andrew Fenn (andrewfenn) wrote :

Do you mean the whole window is blank or just that the background colour of the window is grey?

Changed in beryl-core:
status: Unconfirmed → Needs Info
Changed in compiz:
status: Unconfirmed → Needs Info
Revision history for this message
hiro (robycarc) wrote :

the background of the window is completely grey and the grey is the only thing you see inside.. only the titlebar is normal! while when beryl is off, everything is normal.. It seems like it has some problems with the swing libraries of java..

Revision history for this message
Travis Watkins (amaranth) wrote :

This is a bug in java. Supposedly it's been fixed (for compiz) in the very latest java 6 release.

Changed in beryl-core:
status: Needs Info → Rejected
Changed in compiz:
importance: Undecided → Medium
status: Needs Info → Confirmed
Revision history for this message
Federico Bett (gfbett) wrote :

This is indeed a java bug. It was fixed in java 6 update 1

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6429775

The packages will be updated in feisty? or i will need to install the jdk using the sun provided installer?

Revision history for this message
Daniel Moyne (dmoyne) wrote :

This problem is not solved with jdk1.6.0_02 in Gutsy and Compiz as I still have gray windows displayed when Compiz is activated.

Revision history for this message
Daniel Moyne (dmoyne) wrote :

Sorry I confirm fix with jdk1.6.0_02 in Gutsy with Compiz ; there is no nedd for export AWT_TOOLKIT=MToolkit.

Revision history for this message
James Stansell (jamesstansell) wrote :

The current Gutsy version is Java 1.6.0_03 (java 6u3) but it hasn't been added yet to the feisty repositories. However it is possible to download the gutsy debs and install them on feisty.

Revision history for this message
Jess Sightler (jesse-sightler) wrote :

I can confirm that this fails for me with an un-updated jdk 1.6.0_0 from sun, and works after I downloaded 1.6.0_03 into my home dir. It looks like 6u3 fixes it nicely.

Revision history for this message
Dan Munckton (munckfish) wrote :

I can confirm that the grey windows are still a problem with some Java apps in Gutsy+6u3. I haven't had time yet to work out what is special about the ones which fail.

Revision history for this message
In , Matěj (matj-redhat-bugs) wrote :

Reporter, I am not sure what version of compiz you used in April 2007 (sorry, we
missed this bug's activity), but could you check with the latest updates for FC6
(while it is still supported) whether this bug hasn't gone away in meantime, please?

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

I'm sorry, I'm not in fedora 7.

The bug is somewhat fixed as of release 1.6.0.

You don't need anymore the workaround proposed, but still you get gray windows
when opening dialog boxes. It seems to be quite random, and I'm not sure how to
fix this (I'm still getting this with an updated compiz-4.0 and jdk 1.6.0.3).

I can check with the latest packages in fedora 8 as soon as it gets out, in the
meantime, I'm trying to install compiz-0.6 and compiz-fusion for fedora 7.

I will also test with IcedTea and let you know.

Mario

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

Of course, I mean, "I'm not in Fedora Core 6 anymore"...

Thanks,
Mario

Revision history for this message
mechanized (mechanized) wrote :

yes i confirm the problem
i don't see manus on matlab and i dont see anything on limewire

Revision history for this message
Andrew (andrewkvalheim) wrote :

All Java applets in Firefox are nothing but gray rectangles. Gutsy with compiz.

Revision history for this message
In , Jon (jon-redhat-bugs) wrote :

As indicated previously there has been no update on the progress of this bug
therefore I am closing it as INSUFFICIENT_DATA. Please re-open if the issue
still occurs for you and I will try to assist in its resolution. Thank you for
taking the time to report the initial bug.

Revision history for this message
In , Mario (mario-redhat-bugs) wrote :

Hi,

Sorry for the long delay in replying. This bug seems to be fixed for IcedTea on
fedora 8, I'm currently using the rawhide version of IcedTea (based on b24:
java-1.7.0-icedtea-1.7.0.0-0.23.b24.snapshot.fc9).

I don't know if Sun will ever backport this fix to jdk 1.6, I was also told that
it maybe a mixed compiz and java issue.

This bug was really about jdk and was a reference to the sun bug 6429775, and
not openjdk, so I don't know if you can simply mark this as fixed in rawhide or
just leave as closed/insufficient_data.

Please, note also that NetBeans 6.0 currently does not work well with IcedTea.

Thanks,
Mario

Revision history for this message
Thom Pischke (thom-pischke) wrote :

Though usually OK, this can still occur in Java 6 update 4. Some complex dialogs appear only as grey rectangles, though 'Enter' can still be pressed to get the default action performed.

Whether this is the same bug I don't know, but certainly has the same symptom, though less severe.

Revision history for this message
davie (daviemoston) wrote :

sounds similar to bug #124562, which there is an open sun bug for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6632124. It might be worth voting for this on the sun bug tracker to raise its priority,

Revision history for this message
davie (daviemoston) wrote :

bugs #118983 and #48404 look like they describe the same problem (each with a couple of duplicates).

Revision history for this message
davie (daviemoston) wrote :

I still see intermittently on 1.6.0_03-b05 - mostly in dialog (modal) boxes. The sun bug for this is marked as fixed (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6429775), but there are plenty of recent comments suggesting that it's still a problem.
exporting AWT_TOOLKIT=MToolkit isn't a long term solution, Mtoolkit was replaced by default with XToolkit in java 5, and is likely to be removed at some point.

There is also a thread about the open sun bug here http://forums.java.net/jive/thread.jspa?threadID=33311.
starting post is:
----
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)
---

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Using build 1.6.0_03-b05 Limewire is ok!

Revision history for this message
davie (daviemoston) wrote :

intellij idea still shows the same problem on 1.6.0_03-b05, and the sun bug report is still open (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6632124), and rapidly gaining votes.

Revision history for this message
MountainX (dave-mountain) wrote :

I voted under bug 6632124. Here is my info:

The windows are drawn without content about 30% of the time. Repeatedly closing and re-opening an affected window or dialog box will eventually bring up one that has content.

This bug happens only when extra visual effects (compiz) are enabled. When no visual effects are enabled, the bug does not happen. Additionally, it appears not to happen when Metacity WM is enabled (and compiz is disabled).

additional info:

$ java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)

$ uname -r
2.6.24-15-generic
Ubuntu Hardy beta

$ compiz --version
Checking for Xgl: not present.
Detected PCI ID for VGA: 01:00.0 0300: 10de:0402 (rev a1) (prog-if 00 [VGA controller])
Checking for texture_from_pixmap: present.
Checking for non power of two support: present.
Checking for Composite extension: present.
Comparing resolution (3840x1200) to maximum 3D texture size (8192): Passed.
Checking for nVidia: present.
Checking for FBConfig: present.
Checking for Xgl: not present.
compiz 0.7.2

additional info:
I can confirm that making the apparently empty window (or dialog) extremely large will show some of its content. (If I could make it large enough, I would assume it would show all content.)

Revision history for this message
davie (daviemoston) wrote :

There's an interesting update to the sun bug which suggests that they may have made some progress on a fix, but doesn't give details about what version it will be available in:
State 8-Fix Available, bug
it looks like the property is missing because of sime thread race between WM, us and
X-server. It looks like the best way to fix this is do not read the property at random time, but listen for property change events fot it.
Posted Date : 2008-04-14 14:00:27.0
(from http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6632124)

Revision history for this message
davie (daviemoston) wrote :

another update on the sun bug confirms that it's not released yet.

---
Submitted On 30-APR-2008
roger_lewis

This will be fixed in 6u10 build 24; not yet available,
you can find it at:

https://jdk6.dev.java.net/6u10ea.html

-Roger
---

Revision history for this message
Michael Vondung (mivo) wrote :

The thread at http://ubuntuforums.org/showthread.php?t=362821 proposes a workaround that, so far, seems to be working for me:

Add:

export AWT_TOOLKIT="MToolkit"

... to the end of the .profile file in the /home directory (create it if it doesn't exist).

Revision history for this message
davie (daviemoston) wrote :

A preview release of jdk6 release 10 build 24 is now available at http://download.java.net/jdk6/
I can't reproduce the problem when using the package from there, so it looks like it will finally be fixed in 1.6.0_10.

If anyone tries this preview build and can reproduce the problem then please add a comment to the sun bug at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6632124

Revision history for this message
Michael Nagel (nailor) wrote :

(I think) I am experiencing this bug, too. I am using NetBeans (from the Ubuntu repos) and sometimes a Windows just keeps blank. How could I check if it's actually a duplicate?

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

This bug is still present in Java SE 6 Update 10 RC on x64. (I tested with jdk-6u10-rc-bin-b28-linux-amd64-21_jul_2008.bin).

Revision history for this message
PJSingh5000 (pjsingh5000) wrote :

I was mistaken... like the app. I tested with has an internal jvm so it ignored my environment settings. I did test Java SE 6 Update 10 RC on x64 with NetBeans 6.5M1, and the issue seems to have been resolved. I will post back if I find otherwise.

Revision history for this message
davie (daviemoston) wrote :

I'm also running amd64 and can't reproduce on either b24 or jdk-6u10-rc-bin-b28-linux-amd64-21_jul_2008.bin
Please can you post details of the application you're using and what you're doing if you can still reproduce it (also make sure you have set JAVA_HOME, and that the application uses it - intellij uses JDK_HOME).

Revision history for this message
Bert Van Vreckem (bert-vanvreckem) wrote :

Until 6u10 becomes available, a temporary workaround may be openjdk:

sudo aptitude install openjdk-6-jre
sudo update-alternatives --config java

and select openjdk.

For me, this appears to fix the grey dialog box problem, but fonts are rendered differently, which looks weird.

To have Netbeans use the openjdk instead of Sun's Java, I had to edit /etc/netbeans.conf and modify the line

netbeans_jdkhome="/usr/lib/jvm/java-6-sun"

into

netbeans_jdkhome="/usr/lib/jvm/java-6-openjdk"

Revision history for this message
mechanized (mechanized) wrote :

this bug is resolved on ubuntu 8.04
it plays nicely to me

Revision history for this message
davie (daviemoston) wrote :

Aris - what jre/jdk are you using, and have you used the workaround AWT_TOOLKIT=MToolkit?
Without doing either of these 2 it is still not fixed for me (although it does happen less frequently than it used to).
It's a known jdk bug, so I don't really understand what would fix it other than the fix in the jdk actually being released, which seems to be taking a long time to happen.

Revision history for this message
tuharsky (tuharsky) wrote :

I'm using Ldap Browser Editor (LBE), a .jar application. Since I couldn't run it using Ubuntu's JRE, I must use binary Java installation from Sun, in which the LBE runs.

I see this problem using the recent jre1.6.0_07 from Sun. Using AWT_TOOLKIT workaround helps.

Ubuntu 8.04 Hardy, AMD64 (ordinary i386 installation).

Revision history for this message
frado (frado) wrote :

Hi, I've installed java version "1.6.0_10-rc" and the problems seams to be solved.

Revision history for this message
davie (daviemoston) wrote :

Looks like sun has finally released JDK6 release 10 (http://java.sun.com/javase/downloads/index.jsp).
Once this is packaged then this bug should finally go away.
In the meantime it's easy enough to download/install it manually.

Revision history for this message
James Stansell (jamesstansell) wrote :

The packages are in the intrepid repository.

Matthias Klose (doko)
Changed in sun-java6:
status: Confirmed → Fix Released
Changed in fedora:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.