Keep Glass attached through target-worker shutdown
Early Platform.exit detached JavaFX while queued macOS activation callbacks still called Java. Close the owned example before terminating its JVM, make shutdown idempotent, and reject late preview work. Add real startup-cancellation regressions and native crash-report checks.
This commit is contained in:
@@ -63,6 +63,7 @@ public final class Examples implements PreviewProvider<Person, ApplicationContex
|
||||
if (!javafx.application.Platform.isFxApplicationThread())
|
||||
throw new AssertionError("Cleanup not on FX");
|
||||
closes++;
|
||||
System.out.println("Application cleanup: " + id);
|
||||
service.close();
|
||||
if (id.equals("cleanup-failure")) throw new IllegalStateException("Cleanup failure");
|
||||
}
|
||||
|
||||
+1
@@ -63,6 +63,7 @@ public final class Examples implements PreviewProvider<Person, ApplicationContex
|
||||
if (!javafx.application.Platform.isFxApplicationThread())
|
||||
throw new AssertionError("Cleanup not on FX");
|
||||
closes++;
|
||||
System.out.println("Application cleanup: " + id);
|
||||
service.close();
|
||||
if (id.equals("cleanup-failure")) throw new IllegalStateException("Cleanup failure");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user