← Back to team overview

desktop-packages team mailing list archive

[Bug 601322] Re: java applications not displaying under clutter

 

That version is no more maintained

** Changed in: clutter-1.0 (Ubuntu)
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to clutter-1.0 in Ubuntu.
https://bugs.launchpad.net/bugs/601322

Title:
  java applications not displaying under clutter

Status in clutter-1.0 package in Ubuntu:
  Invalid

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clutter-1.0/+bug/601322/+subscriptions