Android textview stackoverflow when using Hebrew
<p><br>
My app is retrieving data from a RESTful http source.<br>
Sometimes, there will be Hewbrew text.<br>
title קול המדיה, עמוד הבית<br>
content הפיג'מות - עונה 6 פרק 12 עכשיו לצפייה ישירה! קישור: הצג את הדף</p>

<p>Everything is fine until it has to be used in a textview.
I'm using my own list adapter and the following happens when this text tries to get loaded:</p>

<pre><code>I/dalvikvm( 2524): Stack overflow, expanding (0x41048200 to 0x41048000)
I/dalvikvm( 2524): Shrank stack (to 0x41048200, curFrame is 0x41049cd8)
D/AndroidRuntime( 2524): Shutting down VM
W/dalvikvm( 2524): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 2524): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2524): java.lang.StackOverflowError
E/AndroidRuntime( 2524):        at android.text.Styled.drawText(Styled.java:290)
</code></pre>

<p>So, I tried to use a try/catch around the code, but I no help.  The catch doesn't catch this exception.</p>

<p>My code:</p>

<pre><code>try{    
   holder.content.setText(currPage.GetContent())      
   holder.title.setText(currPage.GetTitle());      
} catch (StackOverflowError e){      
   e.printStackTrace();  
}
</code></pre>

<p>That doesn't work because that's not where the exception is actually happening.  It's when the text is being drawn onto the screen.  I don't know how to stop this from happening.
I really would rather just have a blank field if that is the easiest fix, but I don't know how to detect for Hebrew text is decent way.
Any help and suggestions would be greatly appreciated.  </p>

<p>Thanks
Cheers,
Terry.</p>

<p>logcat output:</p>

<pre><code>I/dalvikvm( 2411): Stack overflow, expanding (0x41048200 to 0x41048000)
I/dalvikvm( 2411): Shrank stack (to 0x41048200, curFrame is 0x41049cd8)
D/AndroidRuntime( 2411): Shutting down VM
W/dalvikvm( 2411): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 2411): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2411): java.lang.StackOverflowError
E/AndroidRuntime( 2411):        at android.text.Styled.drawText(Styled.java:290)
E/AndroidRuntime( 2411):        at android.text.Layout.drawText(Layout.java:1366)
E/AndroidRuntime( 2411):        at android.text.Layout.draw(Layout.java:339)
E/AndroidRuntime( 2411):        at android.widget.TextView.onDraw(TextView.java:3921)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5838)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5841)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5841)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319)
E/AndroidRuntime( 2411):        at android.widget.ListView.dispatchDraw(ListView.java:2820)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5944)
E/AndroidRuntime( 2411):        at android.widget.AbsListView.draw(AbsListView.java:2121)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5841)
E/AndroidRuntime( 2411):        at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5841)
E/AndroidRuntime( 2411):        at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1486)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.drawChild(ViewGroup.java:1484)
E/AndroidRuntime( 2411):        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228)
E/AndroidRuntime( 2411):        at android.view.View.draw(View.java:5841)
E/AndroidRuntime( 2411):        at android.widget.FrameLayout.draw(FrameLayout.java:352)
E/AndroidRuntime( 2411):        at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1847)
E/AndroidRuntime( 2411):        at android.view.ViewRoot.draw(ViewRoot.java:1217)
E/AndroidRuntime( 2411):        at android.view.ViewRoot.performTraversals(ViewRoot.java:1030)
E/AndroidRuntime( 2411):        at android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
E/AndroidRuntime( 2411):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2411):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2411):        at android.app.ActivityThread.main(ActivityThread.java:3948)
E/AndroidRuntime( 2411):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2411):        at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 2411):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 2411):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime( 2411):        at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>NOTE:  The original post and title said Arabic. It's been correct to say Hebrew.  Maybe it matters.</p>
