java.lang.StringIndexOutOfBoundsException: length=2042; regionStart=332; regionLength=-219

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

Solutions on the web

java.lang.StringIndexOutOfBoundsException: length=2042; regionStart=332; regionLength=-219
at java.lang.String.startEndAndLength(String.java:593)
at java.lang.String.getChars(String.java:902)
at android.text.SpannableStringInternal.getChars(SpannableStringInternal.java:70)
at android.text.TextUtils.getChars(TextUtils.java:70)
at android.text.TextLine.set(TextLine.java:150)
at android.text.Layout.getLineExtent(Layout.java:941)
at android.text.Layout.draw(Layout.java:405)
at android.widget.TextView.onDraw(TextView.java:4977)
at android.view.View.draw(View.java:10880)
at android.view.View.buildDrawingCache(View.java:10597)
at android.view.ViewGroup.onAnimationStart(ViewGroup.java:2377)
at android.view.ViewGroup.drawChild(ViewGroup.java:2660)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
at android.view.View.draw(View.java:10883)
at android.view.ViewGroup.drawChild(ViewGroup.java:2899)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
at android.view.ViewGroup.drawChild(ViewGroup.java:2897)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
at android.view.ViewGroup.drawChild(ViewGroup.java:2897)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2495)
at android.view.View.draw(View.java:10883)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2005)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1613)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

Users with the same issue

14 times, 1 month ago
Once, 4 months ago
36 times, 5 months ago
6 times, 5 months ago
7 times, 7 months ago
21 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.