JDK-4995929 : Indeterminate JProgressBar prevents normal application exit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2004-02-17
  • Updated: 2017-05-16
  • Resolved: 2004-03-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b45Fixed
Description

Name: gm110360			Date: 02/17/2004


FULL PRODUCT VERSION :
mooijs@tommy:~/projects/test$ java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Debian Linux

A DESCRIPTION OF THE PROBLEM :
See this example code:


import javax.swing.JProgressBar;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class Test
{
	public static void main(String[] argument)
	{
		final JFrame jFrame = new JFrame();
		SwingUtilities.invokeLater(new Runnable()
				{
			public void run()
			{
				JProgressBar jProgressBar = new JProgressBar();
				jFrame.getContentPane().add(jProgressBar);
				jProgressBar.setIndeterminate(true);
				jFrame.pack();
				jFrame.show();
				jFrame.dispose();
				System.out.println("exit");
			}
		});
	}
}


After running this, the application should exit, because all non-deamonn threads are finished. However, the application does not exit.
If one does not make the JProgressBar indeterminate the same example does exit, so maybe a thread animating the indeterminate JProgressBar is left  running?

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the example in the description.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should terminate.
ACTUAL -
Application does not terminate.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
See description.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
A workaround is to set call JProgressBar.setIndeterminate(false) before disposing the JFrame.
(Incident Review ID: 238781) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b45 tiger-beta2
14-06-2004

EVALUATION BasicProgressBarUI will be given a HierarchyListener that starts and stops the indeterminate animation based on the component's displayability (and changes to it). ###@###.### 2004-03-10
10-03-2004