-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Compilation on Linux fails for a JavaFX app with deeply nested lambdas using a custom UI-DSL #3143
Comments
@bgmf We have released GraalVM 21.0 |
Where
Unfortunately it fails with the same error:
|
Are there any news on this issue? Could you recreate it with the provided code? |
@bgmf I have raised a bug for this to dev team |
@christianwimmer are there any news on this issue? |
Fixed by 075fcde. You'll need to use |
Thank you very much! |
Just as a follow up notice: When using a custom GraalVM build from GluonHQ (based on v21.1.x) in combination with Kotlin 1.5.0 (which is switching to use |
Describe the issue
I've created a little JavaFX application, written in Kotlin with the purpose of running natively on Linux, or to be more precise on Ubuntu 20.04. The Kotlin part is a stripped down version from the UI-DSL build into TornadoFX (I only wanted part of the DSL, not the whole framework).
Because of that, there are very many lambdas. When you've nested enough lambdas,
native-image
will not be able to properly compile the code and always fail.It looks the minimal Dialo-API (specifically the
close
function with a supplier), layout (vbox { ... }
, etc.), as well as action listener seem to affected the most.The only way to circumvent this is to reduce the lambda nesting, which results in differen code styles within one application only to mitigate the issue.
Steps to reproduce the issue
The issues only appear, when you've nested enough lambdas. Therefor I've created a gist that exactly showcases my issue.
json
file (reflectionconfig.json
)$ export GRAALVM_HOME=/home/daniel/<path-to>/graalvm-ce/; export JAVA_HOME=$GRAALVM_HOME
$ mvn clean client:build
Describe GraalVM and your environment:
More details
On the aforementioned gist, there's a comment also describing everything in detail.
The build mentioned other logs. In fact there are two of them, which basically contain the same information about the crash as this log here. You can find one of the logs in the gist's comment.
The text was updated successfully, but these errors were encountered: