-
Bug
-
Resolution: Unresolved
-
P3
-
7u40, 8, 9
-
2.2.40-b43, JDK7, MacOS X 10.7.5
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();
}
}
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();
}
}
- relates to
-
JDK-8088859 [Mac] Cannot exit FX application while file chooser is opened
- Open
-
JDK-8175977 SplashScreen preventing Platform.exit() from exiting in JavaFX app
- Open