Bug 430857 - java.swing.Timer on java-1.6.0-openjdk doesn't fire event
Summary: java.swing.Timer on java-1.6.0-openjdk doesn't fire event
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andrew Haley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-30 09:02 UTC by Juan Antonio Martinez
Modified: 2008-11-26 11:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-26 11:23:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Juan Antonio Martinez 2008-01-30 09:02:42 UTC
Description of problem:
java.swing.Timer on java-1.7.0-icedtea-1.7.0.0 doesn't fire event

Version-Release number of selected component (if applicable):
java-1.7.0-icedtea-1.7.0.0

How reproducible:
Edit and compile this test program:

[jantonio@jonsy tmp]$ cat Test.java
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.Timer;

public class Test extends JFrame implements ActionListener {
        private JLabel label=new JLabel("Count:");
        private int count=0;
        public Test () {
                super("Timer Test");
                setSize(300,200);
                setContentPane(getPanel());
                setVisible(true);
                new Timer(1000,this).start();
        }
        public JPanel getPanel() {
                JPanel p=new JPanel();
                p.add(label);
                return p;
        }
        public void actionPerformed(ActionEvent e) {
                label.setText("Count: "+ (count++));
                repaint();
        }
        public static void main (String [] args) {
                Test t=new Test();
        }
}


Steps to Reproduce:
1. Compile and run provided test code
  
Actual results:
Label "Count" stays fixed

Expected results:
Label "Count" should show an increasing counter

Additional info:

Compiling with icedtea "javac -target 1.5 Test.java", gets a .class file 
that works fine in ms-windows, but fails in Fedora 8

Compiling and running with Sun's jdk 1.5 works fine, but resulting file 
.class doesn't work with icedtea

Comment 1 Juan Antonio Martinez 2008-01-30 09:10:00 UTC
This error has already been reported in icedTea bugzilla:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=101

Comment 2 Juan Antonio Martinez 2008-01-30 11:02:09 UTC
Works:
bash$ /usr/lib/jvm/java-1.7.0-icedtea/bin/javac -target 1.5 Test.java
bash$ /usr/lib/jvm/java-1.5.0-gcj/bin/java Test

Fail:
bash$ /usr/lib/jvm/java-1.5.0-gcj/bin/javac Test.java
bash$ /usr/lib/jvm/java-1.7.0-icedtea/bin/java Test

So seems to be an error of the icedtea 1.7 jre

Comment 3 Lillian Angel 2008-01-30 15:01:22 UTC
This is a problem with OpenJDK. I will report this upstream

Comment 4 Andrew Haley 2008-01-30 16:51:16 UTC
I have reported it upstream.  Whan I have a bug ID I'll let you know.

Comment 6 Juan Antonio Martinez 2008-02-06 09:48:01 UTC
I've downloaded java-1.7.0-icedtea-1.7.0.0-0.24.b24.fc9.src.rpm
from Fedora development repository, and built and installed against FC8

With this newer version timer Test program works fine. But not sure on
collateral effects :-)

Comment 7 Andrew Haley 2008-02-06 09:57:57 UTC
Whether your build has this bug or not seems almost to be random.
It doesn't matter which version you build.

I've reported it upstream.

Comment 8 Thomas Fitzsimmons 2008-04-26 02:05:52 UTC
Have we received an upstream bug ID for this one yet?

Comment 9 Andrew Haley 2008-04-26 07:40:11 UTC
No, I never received anything.  I could try again to duplicate it
and then re-enter the bug at Sun.

Comment 10 Thomas Fitzsimmons 2008-04-29 19:45:33 UTC
That would be good, thanks.

Comment 11 Andrew Haley 2008-04-30 10:49:59 UTC
Lillian, you changed the summary to

java.swing.Timer on java-1.6.0-openjdk doesn't fire event

I haven't been able to duplicate this with

OpenJDK 64-Bit Server VM (build 1.6.0-b08, mixed mode)

Which version did you use?

Comment 12 Bug Zapper 2008-11-26 09:38:05 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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