Email FC - Can't find the problem..

Discussion in 'Question & Answers' started by 1982Strand, Dec 2, 2012.

  1. 1982Strand

    1982StrandMembers

    Apr 2, 2011
    204
    10
    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 :)
     
  2. ingbrzy

    ingbrzyXiaomi.eu Multilang leader
    Staff Member

    you dont need translate Email.apk or Exchange.apk... pull values-da from any AOSP JB/ICS apk...
     
  3. 1982Strand

    1982StrandMembers

    Apr 2, 2011
    204
    10
    40
    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 ;)
     
  4. Acid

    AcidScripting Ninja
    Staff Member

    Aug 20, 2011
    2,726
    743
    245
    Male
    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
     
  5. 1982Strand

    1982StrandMembers

    Apr 2, 2011
    204
    10
    40
    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
     
  6. 1982Strand

    1982StrandMembers

    Apr 2, 2011
    204
    10
    40
  7. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    Guys can you give a fix for v5 as well?
     
  8. Coldbird

    ColdbirdMembers

    Mar 1, 2013
    347
    100
    65
    Male
    Well that explains why the stock ROM works flawlessly...

    Sent from my MI 2 using Tapatalk 2
     
  9. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    When you say stock you mean china version?
     
  10. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    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
     
  11. Coldbird

    ColdbirdMembers

    Mar 1, 2013
    347
    100
    65
    Male
    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
     
  12. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    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.
     
    ingbrzy likes this.
  13. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    Dear friend why you said you fixed it? The problem still exists.
     
  14. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    Then you didn't download new ROM. All my email notifications come in without error now.
     
  15. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    When did you upload that?
     
  16. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    Hotfix 2 is it that one? Just saw it
     
  17. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    Yeah, and were planning a 3rd soon for random other date problems.
     
  18. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    Nice job guys tnx for the quick replies appreciate that! Btw can i ask you something irrelevant with this here?
     
  19. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    Just tested the newest version.. Again same problems with email!
     
  20. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    I can't duplicate. You'll have to get logcat.
     
  21. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    I just tried the hotfix3 no luck again! Oh god this is a nightmare. Can u please guide me how to get the logcat?
     
  22. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    adb logcat.
     
  23. Coldbird

    ColdbirdMembers

    Mar 1, 2013
    347
    100
    65
    Male
    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
     
  24. Dimisarta

    DimisartaMembers

    Aug 10, 2012
    64
    2
    28
    Male
    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.
     
  25. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,115
    335
    Kansas
    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.
     

Share Our Site