简单的 BrowserComponent 使应用程序崩溃

Simple BrowserComponent crashes the application

这是我在 CodeName One 中开发的第一个应用程序。它基本上是一个带有一些选项(后退、前进、加载 url 等)的 WebView (BrowserComponent)...问题是在模拟模式下构建和启动应用程序后,它会在位:

JRE version: OpenJDK Runtime Environment (11.0.3+7) (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
Java VM: OpenJDK 64-Bit Server VM (11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
Problematic frame:
V  [libjvm.so+0x8ba319]

密码是:

Form hi = new Form("Browser", new BorderLayout());
BrowserComponent browser = new BrowserComponent();
browser.setURL("http://html5test.com/");
hi.add(BorderLayout.CENTER, browser);

打开另一个 URL 而不是 html5test.com 不会立即使应用程序崩溃,但在浏览页面后...

可能是什么问题? 谢谢!

PS:我尝试为 android 构建应用程序,它似乎在我的 phone 上运行良好......问题是如果它在我的电脑上崩溃了,我不确定应用程序是否稳定。

当 运行 在模拟器中时,我们使用非常糟糕的 JavaFX 浏览器组件。当 运行 在其他任何地方(桌面版本除外)我们都使用该平台的本机浏览器,这总是更好。所以你会看到兼容性和稳定性问题。

遗憾的是,JavaFXs 浏览器组件没有稳定的免费替代品。因此,模拟器中的 stability/quality 问题很痛苦,但它们并不表示设备上的行为。