Email FC - Can't find the problem..


1982Strand

Members
Apr 2, 2011
204
40
Hi everyone..

I'm trying to identify an FC in the Email.apk, but I can't figure it out :-(

It happens when I receive a mail and as far as I can tell, it has something to do with the notification of the mail..

I'm using the multi language 2.11.30 (danish) on English locale it works, meaning its a string error somewhere I think, but I just can't find it. And the apk recompiles fine..

Here's the log:

Code:
java.lang.IndexOutOfBoundsException: setSpan (-1 ... 9) 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:581)
 
at com.android.email.NotificationController.createNewMessageNotification(NotificationController.java:511)
 
at com.android.email.NotificationController$MessageContentObserver.onChange(NotificationController.java:894)
 
at android.database.ContentObserver.onChange(ContentObserver.java:129)
 
at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:180)
 
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:1000)
 
at java.lang.Thread.run(Thread.java:856)

And here's the link to the repo with my xmls for Email (if it helps..):

https://bitbucket.org/iBotPeaches/m...10230e/main/Email.apk/res/values-da?at=master

Thanks :)
 
you dont need translate Email.apk or Exchange.apk... pull values-da from any AOSP JB/ICS apk...
 
Err.. Been googling that error all day and finally found something that could somewhat explain what it meant..

To break it down to the essential part, i now fixed the error. It was in arrays.xml, i was missing some strings, which i thought i didn't need as they were "_values" and never gets translated anyway. But they apparently are linked to the corresponding "_entries" and must be present in the array anyways.

Well, learned some more about Android today ;)

Oh, thanks for reply, just saw it after posting this ;)
 
you dont need translate Email.apk or Exchange.apk... pull values-da from any AOSP JB/ICS apk...
Actually MIUI implements some strings into Email.apk. When I started ICS translation I've compared email with aosp and it had lot of new strings from MIUI. But I don't know if everything is used in actuall app.

Wysyłane z mojego Nexus 7 za pomocą Tapatalk 2
 
Actually MIUI implements some strings into Email.apk. When I started ICS translation I've compared email with aosp and it had lot of new strings from MIUI. But I don't know if everything is used in actuall app.

Wysyłane z mojego Nexus 7 za pomocą Tapatalk 2
I think i remember too, that when i started translating, a few apps were only partially done, most likely the email apk, so just took the whole thing and re-translated ;-)

@ my commodore 64
 
Well that explains why the stock ROM works flawlessly...

Sent from my MI 2 using Tapatalk 2
 
Well that explains why the stock ROM works flawlessly...

Sent from my MI 2 using Tapatalk 2
This doesn't help at all. No one cares that you prefer a bloated Chinese rom without gapps

Sent from my MI 2 using Tapatalk 2
 
Uninstalling them takes a second, it works properly and has English language, what else do you want.

Its no reason to be rude.

Also it clearly shows that the problem lies in one of the modifications supplied with those custom roms.

Combined with the info we got from the thread op this gives us a good picture of the problem.

Sent from my MI 2 using Tapatalk 2
 
Uninstalling them takes a second, it works properly and has English language, what else do you want.

Its no reason to be rude.

Also it clearly shows that the problem lies in one of the modifications supplied with those custom roms.

Combined with the info we got from the thread op this gives us a good picture of the problem.

Sent from my MI 2 using Tapatalk 2

You can't uninstall the /system apps, without a root explorer. We find problems. We solve them. Thats how custom roms work. Coming into thread simply to say it works for you, serves nothing to benefit us. Not to mention the context of this thread wasn't this bug.

This thread was made because a translator made a mistake translating in v4, thus had that error. We made that same error on v5 translation, because Xiaomi still thinks its okay to change things on us on a Friday, so we have to work fast while testing to get our ROM out and we missed something. Hard to catch a bug when it happens only when you have multiple email notifications at once.

Either way, we found it and fixed it within 12 hours. How long does it take Xiaomi to fix a bug? From my records anywhere from 1 month to 8. We are a community infinitely better in communication than Xiaomi will ever be. If you prefer their ROM. Then by all means stay on it.

Its one thing to say.

"Hey guys, I noticed this problem isn't in the stock ROM. So its probably a bug."

Instead you choose.

"Well that explains why the stock ROM works flawlessly..."

Which the dot dot dot, and flawlessly make it look like a rude response.
 
  • Like
Reactions: ingbrzy
You can't uninstall the /system apps, without a root explorer. We find problems. We solve them. Thats how custom roms work. Coming into thread simply to say it works for you, serves nothing to benefit us. Not to mention the context of this thread wasn't this bug.

This thread was made because a translator made a mistake translating in v4, thus had that error. We made that same error on v5 translation, because Xiaomi still thinks its okay to change things on us on a Friday, so we have to work fast while testing to get our ROM out and we missed something. Hard to catch a bug when it happens only when you have multiple email notifications at once.

Either way, we found it and fixed it within 12 hours. How long does it take Xiaomi to fix a bug? From my records anywhere from 1 month to 8. We are a community infinitely better in communication than Xiaomi will ever be. If you prefer their ROM. Then by all means stay on it.

Its one thing to say.

"Hey guys, I noticed this problem isn't in the stock ROM. So its probably a bug."

Instead you choose.

"Well that explains why the stock ROM works flawlessly..."

Which the dot dot dot, and flawlessly make it look like a rude response.

Dear friend why you said you fixed it? The problem still exists.
 
I just tried the hotfix3 no luck again! Oh god this is a nightmare. Can u please guide me how to get the logcat?
 
You interpret too much into punctuation.
If I thought that low of this community I wouldn't be registered and active on this forum.

The simple fact remains though that it works on the original ROM without modifications.

Your complaining about Xiaomi not fixing a bug that your / this unofficial ROM introduced in the first place.

But again: I'm not criticizing the work put into this, I'm happy we got it cause a lot of people can't handle the initial setup required to get the stock ROM into good shape.

Sent from my MI 2 using Tapatalk 2
 
Guys the Email force close has stopped but the problem is not solved. Now we just don't get any notification when a mail comes.
And also to get my emails i have to manually refresh.
 
Guys the Email force close has stopped but the problem is not solved. Now we just don't get any notification when a mail comes.
And also to get my emails i have to manually refresh.

I'm sitting here my Gmail account hooked, sending emails waiting for the 5 minute refresh and getting notifications. I can no longer duplicate this. If you need it fixed, i'm gonna need full logcats of the process of sending / receiving during the 5 minute callback during notification check. Since I can't fix a problem without a trace of it.