JDK-8089931 : [Mac] App does not quit with cmd + Q, when having a FileChooser or DirectoryChooser open
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 7u40,8,9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-12-19
  • Updated: 2021-12-18
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
In MacOS, run the Sample App below. Press the button, and once the FileChooser is open quit the application with cmd+Q.

Expected result: App quits correctly
Actual Result: Can not see the UI of the app, but it is still on the Activity Monitor. When running from eclipse we can still see in the Debug view the Threads:

Deamon Thread [Disposer] (Running)
Deamon Thread [Thread-2] (Running)
Thread [JavaFX Application Thread] (Running)
 Thread [DestroyJavaVM] (Running)

------------------------------------HelloWorld.java-------------------
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.FileChooser;
import javafx.stage.Stage;

public class HelloWorld extends Application {
   public static void main(String[] args) {
       launch(args);
   }
   
   @Override
   public void start(final Stage primaryStage) {

       Button btn = new Button();
       btn.setOnAction(new EventHandler<ActionEvent>() {

           @Override
           public void handle(ActionEvent event) {
				FileChooser fc = new FileChooser();
				fc.showOpenMultipleDialog(primaryStage);
           }
       });
       
       StackPane root = new StackPane();
       root.getChildren().add(btn);
       primaryStage.setScene(new Scene(root, 300, 250));
       primaryStage.show();
   }
}
Comments
Similar problem/root cause ?
08-02-2017

If the dialog is invoked as fc.showOpenMultipleDialog(null); one can actually still see the Dialog after quitting.
19-12-2013

I have confirmed that Java is indeed still running but no UI is visible anywhere.
19-12-2013