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
+6 -1
View File
@@ -12,6 +12,7 @@ import subprocess
import sys
import time
import zipfile
from native_crashes import NativeCrashGuard, descendant_workers, await_worker_exit
ROOT = Path(__file__).resolve().parent.parent
p = argparse.ArgumentParser(description=__doc__)
@@ -22,6 +23,7 @@ args = p.parse_args()
output = ROOT / "target/ide-workflow"
output.mkdir(parents=True, exist_ok=True)
for mode in ("classpath", "modulepath"):
crashes = NativeCrashGuard(ROOT)
launch = subprocess.run([sys.executable, ROOT / "scripts/run-fixture-host.py", "intellij",
"--check", "--mode", mode, "--java-home", args.java_home,
"--target-java-home", args.target_java_home, "--idea-home", args.idea_home],
@@ -58,9 +60,12 @@ for mode in ("classpath", "modulepath"):
"result": (base / "SUCCESS.txt").read_text()}
(output / (mode + ".json")).write_text(json.dumps(proof, indent=2) + "\n")
shutil.copyfile(base / "intellij.png", output / (mode + ".png"))
print("PASS registered IntelliJ " + mode + " editor and exclusive JavaFX 26 natives", flush=True)
finally:
workers = descendant_workers(pid)
try:
os.kill(pid, signal.SIGTERM)
except ProcessLookupError:
pass
await_worker_exit(workers)
crashes.check()
print("PASS registered IntelliJ " + mode + " editor, exclusive JavaFX 26 natives and worker shutdown", flush=True)