-
Bug
-
Resolution: Fixed
-
P3
-
jfx11, 8, jfx23
-
b08
-
os_x
It is possible to crash Swing by calling Platform.Exit()
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import javax.swing.*;
public class PlatformExitCrash extends Application {
public static void main(String[] args) {
SwingUtilities.invokeLater(PlatformExitCrash::createSwing);
Application.launch(args);
}
private static void createSwing() {
JDialog d = new JDialog();
Platform.runLater(()-> {
Platform.exit();
});
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
d.setVisible(true);
}
@Override
public void start(Stage st) {
}
}
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import javax.swing.*;
public class PlatformExitCrash extends Application {
public static void main(String[] args) {
SwingUtilities.invokeLater(PlatformExitCrash::createSwing);
Application.launch(args);
}
private static void createSwing() {
JDialog d = new JDialog();
Platform.runLater(()-> {
Platform.exit();
});
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
d.setVisible(true);
}
@Override
public void start(Stage st) {
}
}
- clones
-
JDK-8190329 [macos] Swing InterOp Platform.exit() crash
- Resolved
- relates to
-
JDK-8340377 HelloFXCanvas toy hangs on exit in macOS
- Open
-
JDK-8340849 [macos] Crash when creating a child window of a JavaFX window after Platform::exit
- Resolved
-
JDK-8339183 [macos] Premature exit in Swing interop when last JFrame is disposed
- Resolved
-
JDK-8340442 Enable SwingNodePlatformExitCrashTest after JDK-8340849 is fixed
- Resolved
- links to
-
Commit(master) openjdk/jfx/46522826
-
Review(master) openjdk/jfx/1545
(2 links to)