ReentrantLock的StackOverflowError?

时间:2014-12-31 08:26:01

标签: android stack-overflow

造成此类错误的原因是什么textview? What is ReentrantLock? 请帮助我。

12-3114:34:33.409E/AndroidRuntime(23722):FATALEXCEPTION:main
12-3114:34:33.409E/AndroidRuntime(23722):java.lang.StackOverflowError
12-3114:34:33.409E/AndroidRuntime(23722):atjava.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:182)
12-3114:34:33.409E/AndroidRuntime(23722):atjava.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:261)
12-3114:34:33.409E/AndroidRuntime(23722):atjava.util.concurrent.CopyOnWriteArrayList.remove(CopyOnWriteArrayList.java:370)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:377)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.widget.TextView.onDraw(TextView.java:4041)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.View.draw(View.java:6880)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1647)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1645)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1645)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1645)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1645)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.dispatchDraw(ViewGroup.java:1374)
12-3114:34:33.409E/AndroidRuntime(23722):atandroid.view.ViewGroup.drawChild(ViewGroup.java:1645)

1 个答案:

答案 0 :(得分:0)

我不认为ReentrantLock是您遇到问题的原因。它可能只是一个堆栈碰巧因为已经变大而溢出的地方。我建议你查看你的视图结构和你做的任何invalidate()调用。