JDK-8037776 : [macosx] Swing app fails to exit after last window is disposed when security manager is enabled
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-18
  • Updated: 2016-04-19
  • Resolved: 2014-03-19
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.
JDK 9
9 b08Fixed
Related Reports
Blocks :  
Description
The attached test program sets a default window close behavior of DISPOSE_ON_CLOSE and also adds a button that will explicitly close and dispose the JFrame. Pressing the window close button (to implicitly dispose the window) or the Swing Button (to explicitly close and dispose the window) should cause the application to exit. When running without a security manager this works fine on all platforms. When running with a security manager, it fails to exit on Mac (it exits fine on Windows and Linux).

Steps to reproduce.

1) Run the attached test program with a security manager:

java -Djava.security.manager JFrameDisposeTest

2) Press either the red window close button or the "Close Window" JButton in the app

The window will close, but the app will remain running.

I have attached the thread stack dump.
Comments
The problem is in the CWarningWindow class. It has an executor to animate the icon, but it's never shutdown.
19-03-2014