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

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

问题描述

在Android上使用JavaFXPorts(在Asus Transformer Prime TF201平板电脑上使用Android 4.1.1)时,按下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.

对于fix \tweak \ workaround的任何想法都将非常感激。

Any idea for a fix\tweak\workaround 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天全站免登陆