Android的 - 计算器错误 [英] Android - stackoverflow Error

查看:107
本文介绍了Android的 - 计算器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

得到问题的StackOverflowError。 那现在它的出现只能在一台设备的更糟糕的事情。 我测试迄今的:

Got problem with StackOverflowError. The worse thing that right now its occur only on one device. I've tested so far on:

三星Galaxy SII(2.3.4)

Samsung Galaxy SII (2.3.4)

三星Nexus S(4.0.3)

Samsung Nexus S (4.0.3)

HTC野火(2.3.7和2.2)

HTC Wildfire (2.3.7 and 2.2)

三星Galaxy Tab 10.1(3.2)

Samsung Galaxy Tab 10.1 (3.2)

......,一切都很好。 但是,当我送的应用程序客户和他对宏达假日测试了2.3.4的大跌与此 错误:

...and everything is fine. But when I send app to customer and He tested it on HTC Holiday 2.3.4 its crash with this error:

java.lang.StackOverflowError
at android.widget.TextView.onDraw(TextView.java:4329)
at android.view.View.draw(View.java:6993)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:7105)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.widget.ScrollView.draw(ScrollView.java:1417)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.ViewGroup.drawChild(ViewGroup.java:1730)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1732)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1459)
at android.view.View.draw(View.java:6996)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2054)
at android.view.ViewRoot.draw(ViewRoot.java:1632)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1335)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1991)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4358)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)

有任何可能,我不知道,增加内存等。 应用程序是复杂的,一切都在TabWidget为基本活动。 错误发生在一个活动中,在那里我instand使用的ListView我用 滚动型与动态添加视图。

There is any possibility to I don't know, increase memory, etc. App is complex and everything is on TabWidget as basic activity. Error occur in one activity, where I instand using listView I use scrollview with dynamically added view.

详细信息:

1),在那里我有错误的地方是TabWidget,其中有在另一个 TabWidget有两个目的。

1) The place where I have error is TabWidget, which have inside another TabWidget with Two intents.

什么是好?有TabWidget与TabWidget内或仅具有一个 TabWidget和意图用假tabbuttons与通过的setContentView内容(...)。

What is better? Have TabWidget with TabWidget inside or have only one TabWidget and intent with fake tabbuttons to with the content by setContentView(...).

2)在第一次的意图,我有两个ScrollViews,我第一个动态增加与用户的PIC和同一数据的看法。当您点击用户,出现动画第二滚动型,这也动态地更详细的用户数据填满。所有观点都是从XML文件来了。

2) On first intent I have two ScrollViews, the first one I dynamically add the views with user pic and same data. When you tap the user, appear animation with second ScrollView, which is also dynamically fill up by more detailed user data. All view are coming from xml files.

我没有,而我使用的ListView,没有动画出现此错误,并显示出详细视图我只是改变的内容来看,通过的setContentView方法。我应该回到这个方法? 感谢您的帮助。

I didn't occur this error while I was using ListView, with no Animation and to show detailed view I just change content view, by setContentView method. Should I come back to this method? Thanks for any help.

3)为什么只在一台设备出现这个错误?不幸的是,这是客户端设备是在美国,我在英国,所以我就没有可能重现错误。

3) Why this error occurs only on one device? Unfortunately this is client device with is in USA, I'm in UK, so I got no possibility to reproduce the error.

推荐答案

的StackOverflowError通常当有太多的递归调用,所以我建议你检查每一个会叫自己非常谨慎的方法,具体条件,导致他们发生称自己的时间不合理数量(几千),或造成不退出的情况(无限循环)。

StackOverflowError usually occurs when there are too many recursive calls, so I would suggest that you check every method that would call itself very carefully, specifically conditions that would cause them to call themselves an unreasonable number of times (a few thousands), or cause a no-exit situation (infinite recursion).

有关更详细的帮助,请张贴错误日志等信息。

For more detailed help, please post error log and other info.

这篇关于Android的 - 计算器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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