Warm tip: This article is reproduced from serverfault.com, please click

raspberry pi-通过DRM在Gluon JavaFX 16 EA 4上使用“ getNativeWindowHandle + 0x54”

(raspberry pi - "getNativeWindowHandle+0x54" on Gluon JavaFX 16 EA 4 via DRM)

发布于 2020-11-30 09:12:05

我正在按照Gluon文档中给出的步骤通过DRM在Raspberry Pi 4上运行JavaFX。我从这里下载了JavaFX EA 16构建

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

看来,在装载libgluon_drm.soJavaFXSDK/lib/在getNativeWindowHandle失败

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

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

我正在使用具有2GB RAM的Raspberry Pi 4 ModelB。它在带有桌面的Raspberry Pi OS 32位上运行。

我在干净的安装上执行了所有这些操作。

Questioner
dubbadhar
Viewed
0
dubbadhar 2020-12-03 17:11:59

Pi4具有用于渲染的vc4和用于3D的v3d。你可以探查设备的功能-只有一个人应该承认它具有DRIVER_RENDER或DRIVER_MODESET功能。

Pi4 DRM问题

JavaFX默认选择的卡为/dev/dri/card1就我而言,/dev/dri/card0是用于渲染的那个,而不是card1我通过使用以下运行时参数解决了该问题:

-Degl.displayid=/dev/dri/card0

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