I am currently using 2 libraries in my Android project:
SlidingMenu: https://github.com/jfeinstein10/SlidingMenu
Android-PullToRefresh: https://github.com/chrisbanes/Android-PullToRefresh
With Android 4.x everything works right, but in Android 2.x I get a StackOverflow Exception.
I am not sure if it is an Android version issue or a hardware issue.
This is the log of the exception:
05-22 13:34:30.339: E/AndroidRuntime(15179): java.lang.StackOverflowError
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.text.Styled.measureText(Styled.java:430)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.text.Layout.measureText(Layout.java:1655)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.text.Layout.getLineMax(Layout.java:689)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.text.Layout.draw(Layout.java:340)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.text.BoringLayout.draw(BoringLayout.java:365)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.TextView.onDraw(TextView.java:4259)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6880)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.FrameLayout.draw(FrameLayout.java:357)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1492)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.ListView.dispatchDraw(ListView.java:3138)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6986)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.AbsListView.draw(AbsListView.java:2600)
05-22 13:34:30.339: E/AndroidRuntime(15179): at com.handmark.pulltorefresh.library.PullToRefreshListView$InternalListView.draw(PullToRefreshListView.java:281)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.buildDrawingCache(View.java:6642)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.onAnimationStart(ViewGroup.java:1259)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1505)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.support.v4.view.ViewPager.draw(ViewPager.java:1574)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.FrameLayout.draw(FrameLayout.java:357)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.FrameLayout.draw(FrameLayout.java:357)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at com.slidingmenu.lib.CustomViewAbove.dispatchDraw(CustomViewAbove.java:830)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.view.View.draw(View.java:6883)
05-22 13:34:30.339: E/AndroidRuntime(15179): at android.widget.FrameLayout.draw(FrameLayout.java:357)
Can somebody help me to solve the issue?
Thank you!
You generally see this error when you have too many nested views - a problem which is exacerbated on older versions of Android.
However, I have also noticed that the slidingmenu lib can cause this on older versions of android (3.X or earlier). I used to see this error all the time and it was originating from the slidingmenu code - my own views were only nested 10-15 deep (not great, but not disastrous). I switched to the menu-drawer library https://github.com/SimonVT/android-menudrawer and the error disappeared.
Things to try...
Fire up the android device monitor or hierarchy viewer (http://developer.android.com/tools/debugging/debugging-ui.html) and have a look at your layouts. If there are any views deeper than say, 15-20 you might want to have a look at optimizing your layouts.
Try swapping out your sliding-menu lib for either google's own (in the support lib) or the one I mentioned above (which may be easier to swap as it follows a similar design to slidingmenu - it took me about an hour).
Good luck!
Related
My application has two tabhosts and both of them are necessary. I had to use tabhost instead of actionbar as my application need to be supported by the low-end android device.
Now, my FragmentActivity has two fragments and one of them has a ListView. The ListView loads fine but the application crashes with java.lang.StackOverflowError when I begin to scroll the list.
My layout for each row is very simple and as i told before it loads first time perfectly and crashes while its scrolled.
I put my logcat here.
12-02 15:14:26.929: E/AndroidRuntime(22971): FATAL EXCEPTION: GUI Thread
12-02 15:14:26.929: E/AndroidRuntime(22971): java.lang.StackOverflowError
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.graphics.Paint.measureText(Paint.java:1020)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.graphics.Paint.measureText(Paint.java:1057)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.Styled.drawDirectionalRun(Styled.java:284)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.Styled.measureText(Styled.java:447)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.Layout.measureText(Layout.java:1888)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.Layout.getLineMax(Layout.java:841)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.Layout.draw(Layout.java:386)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.text.BoringLayout.draw(BoringLayout.java:365)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.widget.TextView.onDraw(TextView.java:4334)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6880)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6883)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.buildDrawingCache(View.java:6642)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.getDrawingCache(View.java:6428)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1571)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1643)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.widget.ListView.dispatchDraw(ListView.java:3207)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6986)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.widget.AbsListView.draw(AbsListView.java:3021)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6883)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6883)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.support.v4.view.ViewPager.draw(ViewPager.java:2153)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6883)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.View.draw(View.java:6883)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.widget.FrameLayout.draw(FrameLayout.java:357)
12-02 15:14:26.929: E/AndroidRuntime(22971): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1964)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewRoot.draw(ViewRoot.java:1529)
12-02 15:14:26.929: E/AndroidRuntime(22971): at android.view.ViewRoot.performTra
In my Android application's main Activity is a tabActivity and one of the tab contains another Tab activity. I load the 2nd activity with different views.
There is an error on loading the Application on the emulator.
03-11 16:28:46.463: E/AndroidRuntime(23736): FATAL EXCEPTION: main
03-11 16:28:46.463: E/AndroidRuntime(23736): java.lang.StackOverflowError
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.text.Styled.measureText(Styled.java:430)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.text.Layout.measureText(Layout.java:1655)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.text.Layout.getLineMax(Layout.java:689)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.text.Layout.draw(Layout.java:340)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.text.BoringLayout.draw(BoringLayout.java:365)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.TextView.onDraw(TextView.java:4150)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6880)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.AbsListView.dispatchDraw(AbsListView.java:1480)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.ListView.dispatchDraw(ListView.java:3138)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.ExpandableListView.dispatchDraw(ExpandableListView.java:229)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6986)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.AbsListView.draw(AbsListView.java:2584)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.FrameLayout.draw(FrameLayout.java:357)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.FrameLayout.draw(FrameLayout.java:357)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.FrameLayout.draw(FrameLayout.java:357)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.FrameLayout.draw(FrameLayout.java:357)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.View.draw(View.java:6883)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.widget.FrameLayout.draw(FrameLayout.java:357)
03-11 16:28:46.463: E/AndroidRuntime(23736): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1862)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewRoot.draw(ViewRoot.java:1522)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
03-11 16:28:46.463: E/AndroidRuntime(23736): at android.view.ViewRoot.handleMessage(ViewR
Thrown when the depth of the stack of the running program exceeds some platform or VM specific limit. Typically, this will occur only when a program becomes infinitely recursive, but it can also occur in correctly written (but deeply recursive) programs.
More Details
Most likely in your child activity you are trying to load the first activity again, which loads the second activity, which again loads the first activity and so on, leading to recursion and your app dies because it reaches the memory limit, applied by the OS.
I have a tabhost with 5 tabs which are FragmentActivity. One of them contains a sequence of 7 views. I think that each is a fragment, but when I get to fragment 7 the app explodes.
When I press the continue button in each fragment I start a new fragment in this way:
MyFragment newFragment = new MyFragment ();
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.publish_map_direction, newFragment);
transaction.addToBackStack(null);
transaction.commit();
This is the error:
11-14 13:50:33.640: I/dalvikvm(13823): threadid=1: stack overflow on call to Landroid/text/Layout;.draw:VLLLI
11-14 13:50:33.640: I/dalvikvm(13823): method requires 288+20+60=368 bytes, fp is 0x4428a42c (300 left)
11-14 13:50:33.640: I/dalvikvm(13823): expanding stack end (0x4428a300 to 0x4428a000)
11-14 13:50:33.640: I/dalvikvm(13823): Shrank stack (to 0x4428a300, curFrame is 0x4428cc74)
11-14 13:50:33.640: D/AndroidRuntime(13823): Shutting down VM
11-14 13:50:33.640: W/dalvikvm(13823): threadid=1: thread exiting with uncaught exception (group=0x40015578)
11-14 13:50:33.703: E/AndroidRuntime(13823): FATAL EXCEPTION: main
11-14 13:50:33.703: E/AndroidRuntime(13823): java.lang.StackOverflowError
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.widget.TextView.onDraw(TextView.java:4229)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6933)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.buildDrawingCache(View.java:6695)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.onAnimationStart(ViewGroup.java:1259)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1505)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.widget.FrameLayout.draw(FrameLayout.java:357)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.widget.FrameLayout.draw(FrameLayout.java:357)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.widget.FrameLayout.draw(FrameLayout.java:357)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.View.draw(View.java:6936)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.widget.FrameLayout.draw(FrameLayout.java:357)
11-14 13:50:33.703: E/AndroidRuntime(13823): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1904)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewRoot.draw(ViewRoot.java:1527)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewRoot.performTraversals(ViewRoot.java:1263)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.os.Handler.dispatchMessage(Handler.java:99)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.os.Looper.loop(Looper.java:130)
11-14 13:50:33.703: E/AndroidRuntime(13823): at android.app.ActivityThread.main(ActivityThread.java:3687)
11-14 13:50:33.703: E/AndroidRuntime(13823): at java.lang.reflect.Method.invokeNative(Native Method)
11-14 13:50:33.703: E/AndroidRuntime(13823): at java.lang.reflect.Method.invoke(Method.java:507)
11-14 13:50:33.703: E/AndroidRuntime(13823): at com.
Should I structure my app in a different way?
Yes.
I would recommend using just fragments, instead of nesting fragment activities inside the tab host. I usually create a tab bar and just have a frame layout below it that I put a fragment in. then i replace fragments depending on what gets clicked. That should definitely help, because I think you just have too many things going at the same time.
I integrated ActionBarSherlock into my Android application. It is mostly working well, with one serious exception...
When running specifically on API Level 10 (which corresponds to Android 2.3.3), and only on that version, a StackOverflowError (shown below) is happening at a certain point when the user navigates between two particular activities. The call stack reveals that this error happens entirely within the Android framework, independent of my custom code.
The only reason I know it is related to ActionBarSherlock is that the error doesn't happen if I revert my changes to the activity classes so that they again inherit from the standard Activity base class instead of SherlockActivity, and revert to a non-Sherlock theme.
FATAL EXCEPTION: main
java.lang.StackOverflowError
at com.android.internal.util.ArrayUtils.emptyArray(ArrayUtils.java:107)
at android.text.SpannableStringInternal.getSpans(SpannableStringInternal.java:269)
at android.text.SpannedString.getSpans(SpannedString.java:25)
at android.text.Styled.drawUniformRun(Styled.java:67)
at android.text.Styled.drawDirectionalRun(Styled.java:322)
at android.text.Styled.drawText(Styled.java:381)
at android.text.Layout.drawText(Layout.java:1703)
at android.text.Layout.draw(Layout.java:505)
at android.text.BoringLayout.draw(BoringLayout.java:365)
at android.widget.TextView.onDraw(TextView.java:4431)
at android.view.View.draw(View.java:6880)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.widget.ScrollView.draw(ScrollView.java:1703)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.buildDrawingCache(View.java:6640)
at android.view.View.getDrawingCache(View.java:6428)
at android.view.ViewGroup.drawChild(ViewGroup.java:1571)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
at android.view.View.draw(View.java:6883)
at android.widget.FrameLayout.draw(FrameLayout.java:357)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1921)
at android.view.ViewRoot.draw(ViewRoot.java:1526)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1262)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1863)
I just encountered a similar error when invalidateOptionsMenu() was being called twice in very quick succession (in onResume, and then in onPrepareOptionsMenu).
Once I removed the invalidateOptionsMenu() calls from onPrepareOptionsMenu, the issue went away. Maybe this isn't what's happening in your situation, but just thought I'd offer it as a possible solution.
The UI thread stack size on Android 2.x is smaller than Android 4.x. This means older versions are more prone to StackOverflowErrors. This explains why you only experience this on an older version.
The problem with ABS is that it automatically adds a few nested views to your layout (the main layout which holds the action bar). You can see these extra views by using Hierarchy Viewer.
If you already had a deep layout with many nested views, adding ABS probably added the extra views that filled up your stack.
What I suggest is that you simplify your layout and remove some of your extra views. There are a few tips on how to optimize layouts in the Android Developer Blog (by Romain Guy). If you save about 2-3 views, it should compensate on what ABS added and you should be fine.
I'm having a crash when refreshing a view inside a SlidingTray (custom SlidingDrawer coming from the top).
I'm not sure what causing it.. but my first guess is that it's due to the number of nested layouts...
What is the maximum number of nested layouts?
Is it device specific, how can I be sure if that's the cause?
If it's not, any of these things is causing it.. what is?
The stacktrace:
E/AndroidRuntime( 2199): FATAL EXCEPTION: main
E/AndroidRuntime( 2199): java.lang.StackOverflowError
E/AndroidRuntime( 2199): at android.graphics.Paint.measureText(Paint.java:1057)
E/AndroidRuntime( 2199): at android.text.Styled.drawDirectionalRun(Styled.java:267)
E/AndroidRuntime( 2199): at android.text.Styled.measureText(Styled.java:430)
E/AndroidRuntime( 2199): at android.text.Layout.measureText(Layout.java:1655)
E/AndroidRuntime( 2199): at android.text.Layout.getLineMax(Layout.java:689)
E/AndroidRuntime( 2199): at android.text.Layout.draw(Layout.java:340)
E/AndroidRuntime( 2199): at android.text.BoringLayout.draw(BoringLayout.java:365)
E/AndroidRuntime( 2199): at android.widget.TextView.onDraw(TextView.java:4168)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6880)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.widget.FrameLayout.draw(FrameLayout.java:357)
E/AndroidRuntime( 2199): at android.widget.ScrollView.draw(ScrollView.java:1409)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.buildDrawingCache(View.java:6640)
E/AndroidRuntime( 2199): at android.view.View.getDrawingCache(View.java:6428)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1571)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1392)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.widget.FrameLayout.draw(FrameLayout.java:357)
E/AndroidRuntime( 2199): at android.widget.ScrollView.draw(ScrollView.java:1409)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6986)
E/AndroidRuntime( 2199): at android.widget.FrameLayout.draw(FrameLayout.java:357)
E/AndroidRuntime( 2199): at android.widget.HorizontalScrollView.draw(HorizontalScrollView.java:1409)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at com.vodafone.onm.components.SlidingTray.dispatchDraw(SlidingTray.java:426)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.widget.FrameLayout.draw(FrameLayout.java:357)
E/AndroidRuntime( 2199): at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
E/AndroidRuntime( 2199): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
E/AndroidRuntime( 2199): at android.view.View.draw(View.java:6883)
E/AndroidRuntime( 2199): at android.widget.FrameLayout.draw(FrameLayout.java:357)
E/AndroidRuntime( 2199): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java)
UPDATE:
Hierarchy Viewer Snapshot
http://d.pr/kXnp
.
Some thinks I think are related:
http://www.mail-archive.com/android-developers#googlegroups.com/msg48036.html
What is the maximum number of nested layouts?
There is no specific value. You run out of stack space when you run out of stack space, and that will be contingent upon what you are doing. The main application thread has an 8KB stack, last I heard.
That being said, if Hierarchy View is showing a depth of 10 or more (root to deepest leaf), I start to get nervous, and by 15 you are likely to start running into exceptions. Your image, which is nearly illegible, appears to have a depth substantially higher than that.
You seem to have a number of wasted layers. If you have a layer in Hierarchy View, on the critical path, that has one parent and one child, that is a prime candidate to be removed, as it may not be adding any value. You have at least 5 of these candidates. Even cleaning all of that up may not be sufficient, but it is a starting point.