Menu

#765 Compiz causes numerous Java Swing bugs

6: Crashes
open-accepted
nobody
1
2009-11-06
2009-05-25
No

In Linux with Compiz is enabled, DrJava breaks in a multitude of ways. Since mid-2006, Sun has acknowledged problems with running AWT/Swing in the context of Compiz but has not been very responsive in fixing the problem. I recently installed Ubuntu 9.04 on a new laptop and was dismayed when DrJava blew up in various ways (crashing the OS when opening a folder to populate a project, failing to resize the mainframe, displaying blank popup dialog screens, etc.). I never enable compiz but I wondered if it was enabled by default in Ubuntu 9.04. Voila! It is. We need to check on startup if compiz is enabled and warn users that DrJava may fail catastrophically if it continues. We should also point to a browser page that explains the best way to disable compiz, a question that I cannot answer at this time. I uninstalled all packages with compiz in the name and rebooted which seemed to work but that procedure is too drastic for many users (who might want to selectively disable compiz when running certain applications.

For the record, I was running Java 6.0_Update 13 and Java 5.0 Update 18 when these problems occurred.

Discussion

  • Robert Cartwright

    Fixed in SVN.

     
  • Robert Cartwright

    • labels: --> 389637
    • assigned_to: nobody --> rcartwright
    • milestone: --> 184338
    • status: open --> pending-fixed
     
  • Robert Cartwright

    • labels: 389637 --> User interface
    • milestone: 184338 --> 6: Crashes
    • status: pending-fixed --> open-accepted
     
  • Robert Cartwright

    • assigned_to: rcartwright --> nobody
     
  • Dan Smith

    Dan Smith - 2009-06-19

    I can reproduce it, too. Also running Ubuntu 9.04 with Java 1.6.0_13-b03. File->Open destroys the entire window environment (luckily, the power button on my laptop still brings up the "Shut Down" dialog, so I can recover without a forced shutdown).

    It looks like System->Preferences->Appearance->Visual Effects->None is the easiest end-user workaround. I could not reproduce the problem after making that change (I assume it turns Compiz off).

    For what it's worth, I've seen serious glitches in Skype and the built-in games that are probably also related to Compiz, although nothing this extreme.

    (As a side note, the Metal LAF looks extremely out-of-place and unprofessional on a standard Ubuntu desktop. GTK or something better should be made the default.)

     
  • Mathias Ricken

    Mathias Ricken - 2009-08-02
    • status: open-accepted --> closed-accepted
     
  • Mathias Ricken

    Mathias Ricken - 2009-08-02

    This isn't something we can fix. We have to hope the Compiz people or Sun fix the problem. We do have a warning message in SVN now, though.

     
  • Dan Smith

    Dan Smith - 2009-11-06

    I'm reopening this so we can track it as software is updated and eventually remove the warning.

    I've confirmed that the problem remains in Ubuntu 9.10 (with Java 1.6.0_16).

     
  • Dan Smith

    Dan Smith - 2009-11-06
    • priority: 7 --> 1
    • status: closed-accepted --> open-accepted
     
  • Dan Smith

    Dan Smith - 2010-07-19

    Seems to be fixed in Ubuntu 10.04. I just installed Ubuntu fresh, and can no longer reproduce the problem.

    $ -> java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ -> compiz --version
    compiz 0.8.4

    I'm guessing this is due to an update to compiz, but it would be worth more extensive testing.

    We should turn off the Compiz warning for this configuration.

    (I was going to complain about the default LAF, but it looks like I already did in a previous comment. :) This one seems to match the system settings most closely: com.sun.java.swing.plaf.gtk.GTKLookAndFeel.)

     
  • Mathias Ricken

    Mathias Ricken - 2010-07-19

    Dan, you could add a check in DrJava.java after the line

    if (!compiz) return false; // no Compiz

    that runs "compiz --version" and parses the version printed out. If it is 0.8.4 or newer, you return false;

     
  • Mathias Ricken

    Mathias Ricken - 2010-08-09

    Further support that Java 1.6.0_20 fixed this problem:
    http://ubuntuforums.org/showthread.php?p=9695848#post9695848

    It seems like Java version 1.6.0_20 is the most critical piece of information. Should we also check for Ubuntu version >= 10.04 and compiz version >= 0.8.4?

     
  • Mathias Ricken

    Mathias Ricken - 2010-08-09

    I added a check for Java version 1.6.0_20 and only display the warning if the current version is older.

     
  • Mathias Ricken

    Mathias Ricken - 2010-08-10

    I also changed the look-and-feel selection to use the system default on Linux. On Ubuntu, that's currently GTK.

     

Log in to post a comment.