title: ActionBarSherlock for Android causing StackOverflowError
body: <p>I integrated ActionBarSherlock into my Android application. It is mostly working well, with one serious exception...</p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <pre><code>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)
  </code></pre>