java applications not displaying under clutter

Bug #601322 reported by William Fraser
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
clutter-1.0 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello, I've recently installed 10.04 Netbook remix on my EeePc 901.
According to synaptic I've got libclutter-1.0-0 (version 1.2.4-0ubuntu1) installed.

I first noticed that the java console was comming up blank: it was opening and the close button was there in the top right but the text pane wasn't there and neither were any other buttons normally pressent. Then I noticed a similar problem when I tried running java which use a GUI - the window opens but no content other than the close window button on the title bar.

Initially I thought it might be a problem with java, however I've tried icedtea based on openjdk as well as the latest ubuntu sun package (6.20), and even an older version of java (1.4) and the same problem occurs across all of them with failure to display the GUI. I'm not sure about the 6.20 or icedtea, but 1.4 worked on ubuntu 9.10 netbook remix (although occasionally the GUI would fail to display, but restart the application and it would work).
So I'm assuming it's not a problem with java or it's variants.

If I logout and log back in but set the desktop to gnome. Now no problems, applications run fine with no problem with the GUI. Also the java console displays when I use a java applet in firefox.
Log out and back into netbook clutter desktop and the problem is back again.
So it's not a linux problem, or a java problem, but looks like either a clutter or maximus problem.

I wrote a java program to test the problem and to check the size to make sure it wasn't a problem with maximus. It can be run as either an applet (from in a browser using the html code <applet code="Test.class" height="384" width="512"></applet>) or as an application from the command line with 'java Test' It should open up a window with a display area at least 512 by 384 pixels and paint it black. It reports the size of the window insets (left,right - top,bottom) if run as an application, will report 'init' when it's initialized, and then report the width and height of the display inside the window/applet. There are often a few odd values reported, but it's the last one that's important as this is the size that the window manager uses to display the output.
When I run it using something other than clutter and maximus it comes back at 512,384 as you'd expect and opens a window to display black at this size (this works under ubuntu netbook using gnome and windows). Under the clutter/maximus when I run as an application the size comes back as 1024,575 which is the size of the display minus the bar at the top which seems logical, but there is no displayed GUI. If I run it in a browser, it displays a black rectangle that although I haven't measured it looks as if it's 512 by 384. There's no output of course as the java console isn't working.
So I assume that maximus is working as it's setting the correct size for the window.

I may be wrong but it looks like it's some problem with clutter (possibly not unique to the latest version as there were intermittent display problems under ubuntu netbook remix 9.10)

I've tried using apport-bug but it won't recognise clutter, clutter-1.0, or libclutter....

Here's the java source code of the test program i used. There's no facility to add a file so I can't attach the compiled .class file. I'm not sure how familiar you are with java, but to compile it you need java development kit installed, and then the command 'javac Test.java' where Test.java is the code listed below, and javac is the java bytecode compiler in the bin directory of wherever java was installed.

import java.awt.event.*;

import javax.swing.*;

import java.awt.*;

final public class Test extends JApplet implements WindowListener {

public void init() {

  System.out.println("init");

}

public void paint(Graphics g) {

  update(g);

}

public void update(Graphics g) {

  int w=getSize().width;

  int h=getSize().height;

System.out.println(w+","+h);

    g.setColor(Color.black);

    g.fillRect(0,0,w,h);

}

// WindowListener methods

public void windowActivated(WindowEvent e) {} // Invoked when the Window is set to be the active Window.

public void windowClosed(WindowEvent e) {} // Invoked when a window has been closed as the result of calling dispose on the window.

public void windowClosing(WindowEvent e) { // Invoked when the user attempts to close the window from the window's system menu.

  System.exit(0);

}

public void windowDeactivated(WindowEvent e) {} // Invoked when a Window is no longer the active Window.

public void windowDeiconified(WindowEvent e) {} // Invoked when a window is changed from a minimized to a normal state.

public void windowIconified(WindowEvent e) {} // Invoked when a window is changed from a normal to a minimized state.

public void windowOpened(WindowEvent e) {} // Invoked the first time a window is made visible.

public static void main(String args[]) {

  JFrame f=new JFrame("Test");

  Test t=new Test();

  f.show();

  java.awt.Insets in=f.getInsets();

System.out.println(in.left+","+in.right+" - "+in.top+","+in.bottom);

  f.addWindowListener(t);

// create frame big enough to hold area 512 by 384

  f.setSize(512+in.left+in.right,384+in.top+in.bottom);

  f.getContentPane().add("Center",t);

  t.init();

  f.setVisible(true);

 }

} //end of class

Tags: lucid
Revision history for this message
William Fraser (william-fraser) wrote :

Sorry, just realized that I can add attachments but was hidden under extra options.
Here are the java source code, the compiled class file, and a html file that when opened in a browser will open the program as an applet.

Revision history for this message
William Fraser (william-fraser) wrote :

Hello, I've done a bit more testing as someone has put down a similar bug to a problem with swing.

So I've re-written the test java program using the AWT (uses platforms' native windows and components). There is no swing code in it now.

It still displays when run as an applet in a browser, and still doesn't display when run as an application from the command line (although the program seems to be setting the window dimensions to the right size)

So I think that this rules out any problem with swing being the cause of this bug.

Revision history for this message
Pascal Allegra (pascal79-deactivatedaccount) wrote :

Same problem with my ubuntu netbook 10.04 and Java (jdk) sun from partner repos (on Acer Aspire One D150).
Let me know if you need info about my specs.

Revision history for this message
papukaija (papukaija) wrote :

This bug report is being marked as confirmed because it is affecting more than one person. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in clutter-1.0 (Ubuntu):
status: New → Confirmed
tags: added: lucid
Revision history for this message
papukaija (papukaija) wrote :

Please unzipped files, so that they can be viewed within the browser. Thanks in advance!

Revision history for this message
dino99 (9d9) wrote :

That version is no more maintained

Changed in clutter-1.0 (Ubuntu):
status: Confirmed → Invalid
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.