Bug 213908 - Swing application on Sun Java 1.5 and 1.6 do not fully work with compiz
Summary: Swing application on Sun Java 1.5 and 1.6 do not fully work with compiz
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: compiz
Version: 7
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kristian Høgsberg
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-03 18:31 UTC by Mario Torre
Modified: 2018-04-11 15:34 UTC (History)
4 users (show)

Fixed In Version: f8
Clone Of:
Environment:
Last Closed: 2008-01-12 04:22:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mario Torre 2006-11-03 18:31:57 UTC
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

Comment 1 Mario Torre 2006-11-10 21:09:27 UTC
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...

Comment 2 Mario Torre 2007-04-10 11:24:56 UTC
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).

Comment 3 Matěj Cepl 2007-10-22 22:06:51 UTC
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?

Comment 4 Mario Torre 2007-10-23 11:22:08 UTC
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

Comment 5 Mario Torre 2007-10-23 11:35:35 UTC
Of course, I mean, "I'm not in Fedora Core 6 anymore"...

Thanks,
Mario

Comment 6 Jon Stanley 2008-01-12 04:22:28 UTC
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.

Comment 7 Mario Torre 2008-01-12 09:20:19 UTC
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


Note You need to log in before you can comment on or make changes to this bug.