“getNativeWindowHandle+0x54"在 Gluon JavaFX 16 EA 4 上通过 DRM [英] "getNativeWindowHandle+0x54" on Gluon JavaFX 16 EA 4 via DRM

查看:67
本文介绍了“getNativeWindowHandle+0x54"在 Gluon JavaFX 16 EA 4 上通过 DRM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 Gluon 文档 中给出的步骤在 Raspberry Pi 上运行 JavaFX4 通过 DRM.我从此处下载了 JavaFX EA 16 版本.

javafx.properties 文件:

javafx.version=16-internaljavafx.runtime.version=16-internal+28-2020-11-10-180413javafx.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

然而,这导致了以下错误:

<预><代码>## Java 运行时环境检测到一个致命错误:## SIGSEGV (0xb) 在 pc=0x9c3314dc, pid=734, tid=746## JRE 版本:OpenJDK 运行时环境 (11.0.9+11) (build 11.0.9+11-post-Raspbian-1deb10u1)# Java VM:OpenJDK Server VM(11.0.9+11-post-Raspbian-1deb10u1,混合模式,串行gc,linux-)# 有问题的框架:# C [libgluon_drm.so+0x14dc] getNativeWindowHandle+0x54## 不会写入核心转储.核心转储已被禁用.要启用核心转储,请尝试ulimit -c unlimited".在再次启动 Java 之前## 包含更多信息的错误报告文件保存为:#/home/pi/samples/CommandLine/Modular/CLI/hellofx/hs_err_pid734.log## 如果您想提交错误报告,请访问:# 未知# 崩溃发生在本地代码中的 Java 虚拟机之外.# 请参阅有问题的框架以了解在哪里报告错误.#中止

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

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

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

我使用的是带有 2GB RAM 的 Raspberry Pi 4 B 型.它在带有桌面的 Raspberry Pi OS 32 位上运行.

我在全新安装时执行了所有这些操作.

解决方案

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.

I was following the steps given at Gluon Documentation to run JavaFX on Raspberry Pi 4 via DRM. I downloaded the JavaFX EA 16 builds from here.

javafx.properties file :

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

After cloning the samples repository containing hellofx, I compiled it via javac (according to the steps) and then ran this command to run it using 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

However, this caused the following error :

#
# 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

It seems that while loading libgluon_drm.so in JavaFXSDK/lib/ fails at getNativeWindowHandle

What's weird is that after I ran sudo apt install libegl* mesa* libgl*, it actually succeeded but was asking me to set variable ENABLE_GLUON_COMMERCIAL_EXTENSIONS as true, which I had already done.

However, after rebooting, it started showing the same error.

I am using a Raspberry Pi 4 Model B with 2GB RAM. It is running on Raspberry Pi OS 32-Bit with desktop.

I had performed all of this on a clean installation.

解决方案

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

The card which JavaFX selects by default is /dev/dri/card1. In my case, /dev/dri/card0 was the one to be used for render, and not card1. I solved the issue by using the following runtime argument :

-Degl.displayid=/dev/dri/card0

The JavaFX Version I used was 16-ea+5.

这篇关于“getNativeWindowHandle+0x54"在 Gluon JavaFX 16 EA 4 上通过 DRM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆