在 Android 上按下 FX ComboBox 时出现 java.lang.StackOverflowError [英] java.lang.StackOverflowError when pressing FX ComboBox on Android

查看:15
本文介绍了在 Android 上按下 FX ComboBox 时出现 java.lang.StackOverflowError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Android(Asus Transformer Prime TF201 平板电脑上的 Android 4.1.1)上使用 JavaFXPorts 时,按下 ComboBox 时会引发 java.lang.StackOverflowError(参见堆栈跟踪的顶部堆栈下方).

When using JavaFXPorts on Android (Android 4.1.1 on Asus Transformer Prime TF201 tablet), a java.lang.StackOverflowError is thrown when pressing on a ComboBox (see below the top stacks of the stacktrace).

它发生在我的 FX 应用程序中的 ComboBox 中,并且在 Ensemble 中的 ComboBox 示例中也可以 100% 重现.换句话说:不能使用 JavaFX ComboBox.

It happens in a ComboBox in my FX application and is also 100% reproducible with the ComboBox example that is in Ensemble. In other words: can't use JavaFX ComboBox.

我知道许多论坛上都发布了 Android 堆栈大小限制,并且对于 Android UI 和 Android API 发生这种情况时应该怎么做有各种建议.但是,在使用 JavaFX UI 和 JavaFXPorts 时找不到相关的想法来应用.

I'm aware of the Android stack size limit posted in many forums and there are various suggestions on what to do when it happens with Android UI and Android APIs. However, can't find a relevant idea to apply when using JavaFX UI and JavaFXPorts.

任何修复调整解决方法的想法将不胜感激.

Any idea for a fix weakworkaround would be much appreciated.

E/AndroidRuntime(32212): FATAL EXCEPTION: JavaFX Application Thread
E/AndroidRuntime(32212): java.lang.StackOverflowError
E/AndroidRuntime(32212):        at javafx.scene.Node.getTransformedBounds(Node.java:3422)
E/AndroidRuntime(32212):        at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1724)
E/AndroidRuntime(32212):        at javafx.scene.Parent.recomputeBounds(Parent.java:1516)
E/AndroidRuntime(32212):        at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1380)
E/AndroidRuntime(32212):        at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078)
E/AndroidRuntime(32212):        at javafx.scene.Node.updateGeomBounds(Node.java:3577)
E/AndroidRuntime(32212):        at javafx.scene.Node.getGeomBounds(Node.java:3530)

推荐答案

您可以创建 java.custom.properties 文件,并在其中包含此属性:

You can create the java.custom.properties file, and include in it this property:

monocle.stackSize=128000

您也可以通过将其他系统属性包含新值来覆盖它们.

You can override other system properties as well by including them with their new values.

将文件放在类路径的根目录下,例如在您项目的文件夹 src/android/resources 中.

Put the file at the root of your classpath, e.g. in the folder src/android/resources of your project.

您可以在此处找到此常见问题解答 此处 以及 JavaFXPorts 的所有文档此处.

You can find this FAQ here here and all the documentation for JavaFXPorts here.

检查这是否解决了您的异常.

Check if this solves your exception.

这篇关于在 Android 上按下 FX ComboBox 时出现 java.lang.StackOverflowError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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