1

现在面临一个奇怪的问题,在我的列表视图中,我使用拉刷新列表它在三星 Galaxy s2 中运行良好,但是当我在索尼设备上测试相同的应用程序时,当我拉刷新列表时它崩溃了,它显示java.lang.StackOverflowError.请检查错误日志并给我一个解决方案。

04-27 17:46:23.874: W/dalvikvm(8663): threadid=1: thread exiting with uncaught exception (group=0x2b547210)
04-27 17:46:23.894: E/AndroidRuntime(8663): FATAL EXCEPTION: main
04-27 17:46:23.894: E/AndroidRuntime(8663): java.lang.StackOverflowError
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.GLES20Canvas.drawTextRun(GLES20Canvas.java:1100)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.GLES20RecordingCanvas.drawTextRun(GLES20RecordingCanvas.java:295)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.TextLine.drawTextRun(TextLine.java:1067)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.TextLine.handleText(TextLine.java:791)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.TextLine.handleRun(TextLine.java:1034)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.TextLine.drawRun(TextLine.java:397)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.TextLine.draw(TextLine.java:195)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.BoringLayout.drawInternal(BoringLayout.java:1019)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.text.BoringLayout.draw(BoringLayout.java:950)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.widget.TextView.onDraw(TextView.java:5067)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.draw(View.java:11082)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.widget.ListView.drawChild(ListView.java:3219)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.widget.AbsListView.dispatchDraw(AbsListView.java:2099)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.widget.ListView.dispatchDraw(ListView.java:3214)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.draw(View.java:11085)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.widget.AbsListView.draw(AbsListView.java:3419)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at com.technoracle.chattrspace_demo_refresh.PullToRefreshView$InternalListView.draw(PullToRefreshView.java:59)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.draw(View.java:11085)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10521)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2593)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.View.getDisplayList(View.java:10519)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.drawChild(ViewGroup.java:2954)
04-27 17:46:23.894: E/AndroidRuntime(8663):     at android.view.ViewGroup.dispatchDr
4

1 回答 1

1

你肯定有递归调用函数getDisplayList(),无论如何都会溢出你的堆栈drawChild()dispatchDraw()你可以检查这些函数的内容,看看如何打破递归调用模式,所以它们最终会返回。

也许你的布局有问题,元素相互依赖或类似的东西。

于 2013-04-27T12:54:12.970 回答