过了一段时间后,我又回到了JavaFX应用程序的本机编译游戏中;在此期间,我用JavaFX构建了很多东西,但很少接触到GraalVM.
在Windows上的设置出现一些问题后,我现在能够编译和链接一个应用程序(并使用rungagent
获得所有的配置).
现在的问题是:应用程序立即崩溃,没有任何日志(log).当我使用nativerun
时,我得到:
[Mo. Dez. 18 14:50:31 MEZ 2023][INFORMATION] [SUB] Dez. 18, 2023 2:50:31 PM com.sun.javafx.application.PlatformImpl startup
[Mo. Dez. 18 14:50:31 MEZ 2023][INFORMATION] [SUB] WARNUNG: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @6b71769e'
[Mo. Dez. 18 14:50:34 MEZ 2023][SCHWERWIEGEND] Process run until end failed with result: -1073741819
Check the log files under C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\log
And please check https://docs.gluonhq.com/ for more information.
[Mo. Dez. 18 14:50:34 MEZ 2023][INFORMATION] Logging process [run until end] to file: C:\Users\...\jfx-updater\target\gluonfx\log\process-run until end-1702907434372.log
上面提到的日志(log)没有任何有用的信息:
Process
=======
run until end
Command Line
============
C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\updater.exe
Output
======
Dez. 18, 2023 2:50:31 PM com.sun.javafx.application.PlatformImpl startup
WARNUNG: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @6b71769e'
Result
======
result: -1073741819
我知道Unsupported JavaFX configuration
警告背后的问题,但这不应该是罪魁祸首.只是一个警告而已.
在我看来,运行编译的日志(log)也没问题:
[Mo. Dez. 18 14:02:18 MEZ 2023][INFORMATION] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[Mo. Dez. 18 14:02:21 MEZ 2023][INFORMATION] [SUB] ========================================================================================================================
[Mo. Dez. 18 14:02:21 MEZ 2023][INFORMATION] [SUB] GraalVM Native Image: Generating 'ch.cnlab.update.mainkt' (shared library)...
[Mo. Dez. 18 14:02:21 MEZ 2023][INFORMATION] [SUB] ========================================================================================================================
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] [1/7] Initializing... (4,1s @ 0,22GB)
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] Version info: 'GraalVM 22.1.0.1 Java 17 CE'
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] C compiler: cl.exe (microsoft, x64, 19.38.33133)
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] Garbage collector: Serial GC
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] 1 user-provided feature(s)
[Mo. Dez. 18 14:02:23 MEZ 2023][INFORMATION] [SUB] - com.oracle.svm.polyglot.kotlin.KotlinFeature
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] [2/7] Performing analysis... [*************] (24,2s @ 4,65GB)
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] 14.135 (91,55%) of 15.440 classes reachable
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] 31.120 (72,74%) of 42.781 fields reachable
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] 72.156 (63,59%) of 113.465 methods reachable
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] 721 classes, 6.078 fields, and 3.234 methods registered for reflection
[Mo. Dez. 18 14:02:48 MEZ 2023][INFORMATION] [SUB] 138 classes, 158 fields, and 208 methods registered for JNI access
[Mo. Dez. 18 14:02:49 MEZ 2023][INFORMATION] [SUB] [3/7] Building universe... (1,8s @ 2,39GB)
[Mo. Dez. 18 14:02:50 MEZ 2023][INFORMATION] [SUB] [4/7] Parsing methods... [*] (0,7s @ 3,87GB)
[Mo. Dez. 18 14:02:52 MEZ 2023][INFORMATION] [SUB] [5/7] Inlining methods... [****] (1,2s @ 5,95GB)
[Mo. Dez. 18 14:03:01 MEZ 2023][INFORMATION] [SUB] [6/7] Compiling methods... [***] (9,7s @ 4,16GB)
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB]
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] ------------------------------------------------------------------------------------------------------------------------
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] 4,8s (9,6% of total time) in 41 GCs | Peak RSS: 9,74GB | CPU load: 5,27
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] ------------------------------------------------------------------------------------------------------------------------
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] Produced artifacts:
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\updater\graal_isolate.h (header)
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\updater\ch.cnlab.update.mainkt.h (header)
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\updater\graal_isolate_dynamic.h (header)
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\updater\ch.cnlab.update.mainkt_dynamic.h (header)
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] C:\Users\...\jfx-updater\target\gluonfx\x86_64-windows\gvm\updater\ch.cnlab.update.mainkt.build_artifacts.txt
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] ========================================================================================================================
[Mo. Dez. 18 14:03:08 MEZ 2023][INFORMATION] [SUB] Finished generating 'ch.cnlab.update.mainkt' in 49,1s.
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] Result for compile: 0
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] Logging process [compile] to file: C:\Users\...\jfx-updater\target\gluonfx\log\process-compile-1702904589886.log
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] PB Command for check version: C:\SDK\java\gluon\graalvm-svm-java17-windows-gluon-22.1.0.1-Final\bin\java -version
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] Start process check version...
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] [SUB] openjdk version "17.0.3" 2022-04-19
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] [SUB] OpenJDK Runtime Environment GraalVM 22.1.0.1 (build 17.0.3+7-jvmci-22.1-b06)
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN] [SUB] OpenJDK 64-Bit Server VM GraalVM 22.1.0.1 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing)
[Mo. Dez. 18 14:03:09 MEZ 2023][FEIN]