"getNativeWindowHandle+0x54" 是 Gluon 的 JavaFX 16 EA 4 通过 DRM

"getNativeWindowHandle+0x54" on Gluon JavaFX 16 EA 4 via DRM

我正在按照 Gluon Documentation to run JavaFX on Raspberry Pi 4 via DRM. I downloaded the JavaFX EA 16 builds from here 中给出的步骤进行操作。

javafx.properties 文件:

javafx.version=16-internal
javafx.runtime.version=16-internal+28-2020-11-10-180413
javafx.runtime.build=28

克隆包含 hellofx 的示例存储库后,我通过 javac 编译它(根据步骤),然后 运行 使用 DRM 运行 此命令 运行 它:

sudo -E java -Dmonocle.platform=EGL -Djava.library.path=/opt/arm32hfb-sdk/lib -Dmonocle.egl.lib=/opt/arm32fb-sdk/lib/libgluon_drm.so --module-path /opt/arm32fb-sdk/lib --add-modules javafx.controls -cp dist/. hellofx.HelloFX

但是,这导致了以下错误:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x9c3314dc, pid=734, tid=746

#
# JRE version: OpenJDK Runtime Environment (11.0.9+11) (build 11.0.9+11-post-Raspbian-1deb10u1)
# Java VM: OpenJDK Server VM (11.0.9+11-post-Raspbian-1deb10u1, mixed mode, serial gc, linux-)
# Problematic frame:
# C  [libgluon_drm.so+0x14dc]  getNativeWindowHandle+0x54
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/pi/samples/CommandLine/Modular/CLI/hellofx/hs_err_pid734.log
#
# If you would like to submit a bug report, please visit:
#   Unknown
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted

似乎在 JavaFXSDK/lib/ 中加载 libgluon_drm.so 时在 getNativeWindowHandle

处失败

奇怪的是,在我 运行 sudo apt install libegl* mesa* libgl* 之后,它实际上成功了,但要求我将变量 ENABLE_GLUON_COMMERCIAL_EXTENSIONS 设置为 true,我已经完成了。

但是,重新启动后,它开始显示相同的错误。

我使用的是 Raspberry Pi 4 Model B,内存为 2GB。在 Raspberry Pi OS 32 位桌面上 运行ning。

我在全新安装中执行了所有这些操作。

Pi4 has both vc4 for render, and v3d for 3D. You can probe the devices for their capabilities - only one should acknowledge that it has DRIVER_RENDER or DRIVER_MODESET capabilities.

Pi4 DRM questions

JavaFX默认选择的卡是/dev/dri/card1。在我的例子中,/dev/dri/card0 是用于渲染的,而不是 card1。我通过使用以下运行时参数解决了这个问题:

-Degl.displayid=/dev/dri/card0

我使用的 JavaFX 版本是 16-ea+5