Repository navigation
Feat: Refuse Liberica NIK for AWT-free macOS images, and keep main on the first thread there - #60
Merged
Merged
Conversation
… the first thread there An AWT-free macOS image needs main on the process's first thread, because the AppKit window takes its calls there. Liberica NIK 25.0.4.1 runs main on a new thread on macOS whatever -H:-RunMainInNewThread says (run 39084384117), and the image hangs at its first window call. packageNativeImage now reads the GraalVM's release file before building and stops with the reason and the fix (upstream GraalVM 25) when its IMPLEMENTOR is BellSoft. It also gives -H:-RunMainInNewThread itself, unlocked, for every AWT-free macOS image, so the samples no longer have to. Documented in extended/README.md, README_ko.md and extended/native-image/README.md. NativeImageMainThreadTest covers the detection.
…IK, with the reason
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An AWT-free macOS image needs
mainon the process's first thread, because the AppKit window takes its calls there. Liberica NIK 25.0.4.1 runsmainon a new thread on macOS whatever-H:-RunMainInNewThreadsays (run 39084384117), so any image it builds hangs at its first window call.packageNativeImagereads the GraalVM'sreleasefile before building. WhenIMPLEMENTORis BellSoft and the build is AWT-free on macOS, it stops and gives the reason and the fix (upstream GraalVM 25, asgraalvmHomeorGRAALVM_HOME). AWT images and Linux are unaffected.-H:-RunMainInNewThreaditself, inside the unlocked experimental options, for every AWT-free macOS image. The samples drop their own copy.NativeImageMainThreadTest, plus a macOS gate step that runspackageNativeImagewith Liberica NIK and requires the refusal and its reason.extended/README.md,README_ko.mdandextended/native-image/README.md.