Resolved "Unfortunately, Email has stopped"


Mavamaarten

Members
Jan 26, 2013
74
18
Very often when I get an email on v5, email FC's.
Most of the time it just keeps on FC'ing until I close the app manually.

p5JFSru.jpg


The report I sent to MIUI said something about IndexOutOfRangeException, but I can't really get it to crash again, it only happens when receiving new email.
I've seen some other people with the same problem on a Dutch forum too.

Xiaomi MI2, MiuiAndroid 3.3.1.
 
press Report MIUI - menu - copy and paste here
 
I just recreated the error by sending an email to myselflf.
This is what I get:

Code:
java.lang.IndexOutOfBoundsException: setSpan (-1 ... 32) ends beyond length 0
at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:349)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:77)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at com.android.email.NotificationController.getSingleMessageInboxLine(NotificationController.java:584)
at com.android.email.NotificationController.createNewMessageNotification(NotificationController.java:514)
at com.android.email.NotificationController$MessageContentObserver.onChange(NotificationController.java:897)
at com.android.email.NotificationController.registerMessageNotification(NotificationController.java:369)
at com.android.email.NotificationController.registerMessageNotification(NotificationController.java:347)
at com.android.email.NotificationController.access$400(NotificationController.java:75)
at com.android.email.NotificationController$1.run(NotificationController.java:272)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at com.android.email.NotificationController$NotificationThread.run(NotificationController.java:1033)
at java.lang.Thread.run(Thread.java:856)

I also tried clearing all data of the email application, but no avail.

EDIT: As a workarround, you can disable the notifications for new mail. The app will not force-close anymore, but you will need to manually check for email.