JDK-6254323 : REGRESSION: GUI fails to update in Java SE 5 after lock & release Win2K desktop
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-04-12
  • Updated: 2010-04-02
  • Resolved: 2005-07-18
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Windows 2000 Prof. SP4
(under Windows XP the problem seems NOT to occur)

EXTRA RELEVANT SYSTEM CONFIGURATION :
Tried on 3 very different machines with Windows 2000 - all behaved equally. So it seems no to depend on hardware and network.

A DESCRIPTION OF THE PROBLEM :
JRE fails to update most of or parts of the GUI after releasing a locked Windows 2000 workstation approx. every second or third try.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.) Start sample program under JRE 1.5.0_01 on Windows 2000 SP4
2.) Press <Ctrl>-<Alt>-<Del>, so that the Windows Security Dialog box appears
3.) Press <Esc> to return to the desktop - when using the sample program the text "This text disappears sometimes ..." has disappeared
4.) If the text has not disappeared, repeat steps 2 and 3

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The text "This text disappears sometimes ..." appears always, when the GUI of the sample program is repainted.
ACTUAL -
Often the text "This text disappears sometimes ..." is missing. The progress bar would also be missing - if the sample program would not update the progress bar every second.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages occured.

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;

public class Test extends JFrame
{
    static JProgressBar progress = new JProgressBar(0, 100);

	public Test()
	{
        JPanel panel = new JPanel(true);
        panel.setOpaque(true);
        panel.add(new JLabel("This text disappears sometimes ..."));
        panel.add(progress);
        this.setContentPane(panel);
        this.addWindowListener(new WindowAdapter()
        {
            public void windowClosing(WindowEvent e)
            {
                System.exit(0);
            }
        });
        this.pack();
        this.setVisible(true);
	}

	public static void main(String[] args)
	{
        SwingUtilities.invokeLater(new Runnable()
        {
            public void run()
            {
                new Test();
            }
        });
        // Update progress bar periodically
         ActionListener taskPerformer = new ActionListener()
         {
             public void actionPerformed(ActionEvent evt)
             {
                 progress.setValue((progress.getValue() + 1) % 100);
             }
         };
        Timer timer = new Timer(1000, taskPerformer);
        timer.start();
	}
}

---------- END SOURCE ----------

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 2005-04-12 22:31:43 GMT

Comments
EVALUATION I've done some additional testing and with my own test case, attached as Test2.java. That test case has two labels on it. The test calls repaint() on one of the labels every second. It appears as though if repaint() is called on a component while the desktop is in the "ctrl-alt-delete" state, the entire GUI comes back without painting when you exit that state. To see that in this test case: * launch Test2 * hit CTRL-ALT-DELETE and wait a second (so a repaint can occur) * hit escape (the previous two steps may be different on XP) * the GUI returns fully gray * label two then repaints itself and shows again but label 1 stays blanked I've discovered that this doesn't seem to happen with -Dswing.volatileImageBufferEnabled=false set. It also seems to have dissapeared in Mustang, probably due to the gray-rect fix. It's probably worth taking a look at anyway. ###@###.### 2005-04-13 15:46:19 GMT I believe Chet has found and fixed the root of this problem, emailing for exact bug. ###@###.### 2005-07-12 20:46:23 GMT The bug this was fixed against is 6245013, closing as a duplicate. ###@###.### 2005-07-18 17:43:30 GMT
13-04-2005