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:
2026-11-12 15:03:51 +01:00
parent 886ce4a96f
commit 7b1d754320
10 changed files with 245 additions and 14 deletions
@@ -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");
}
@@ -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");
}