Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android bogus span encoding crash

Tags:

java

android

I have an issue in my android application, application crashes from the main activity and the error message is

Caused by: java.lang.RuntimeException: bogus span encoding 17831
    at android.text.TextUtils$1.createFromParcel(TextUtils.java:802)...

this happens not on the all devices, as i can reproduce the error occurs frequently on nexus 5 android version 5.1.1, and also on samsung android version 5.1.1 the error exists.

I have researched a lot but no solution. It seems it was an android 4.0.* version issue but was fixed in latest android versions.

Can anyone help to find the problem?

Thanks

The expanded error message is:

Caused by: java.lang.RuntimeException: bogus span encoding 17831
    at android.text.TextUtils$1.createFromParcel(TextUtils.java:802)
    at android.text.TextUtils$1.createFromParcel(TextUtils.java:679)
    at android.os.Parcel.readCharSequence(Parcel.java:1606)
    at android.os.Parcel.readCharSequenceArray(Parcel.java:1823)
    at android.os.Parcel.readValue(Parcel.java:2185)
    at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
    at android.os.BaseBundle.unparcel(BaseBundle.java:221)
    at android.os.Bundle.getParcelable(Bundle.java:755)
    at android.app.Activity.onCreate(Activity.java:932)
    at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:255)
like image 828
Ani Karapetyan Avatar asked Jun 25 '26 13:06

Ani Karapetyan


1 Answers

You probably have a character not recognized in your app.

If you check the android source code, http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.0_r1/android/text/TextUtils.java

The exception is set at line 715 of the public CharSequence createFromParcel(Parcel p) { Method.

Check the spans in your program to see if there is a problem.

like image 157
JFPicard Avatar answered Jun 28 '26 03:06

JFPicard