Contacts app crashes (NPE) on editing davdroid contact



    1. open the default android (4.1) contacts app
    2. open a contact which origins from a davdroid account
    3. tap on the edit button
    4. contacts crashes and drops you with a message to the home screen

    I cannot reproduce this with every contact, but those who crash do so every time I try.

    The system log of the crash, including the uncatched NullPointerException in the Contacts app can be found here: https://gist.github.com/azrdev/8147534


  • developer

    This is a bug in the Android contact editor. When I have time, I will investigate, but this is not a DAVdroid bug because the editor crashes.


  • developer

    Is it possible that these contacts don't have a display name or structured name?



  • Hi,

    i'll paste the (censored) vcards of one (previously) working contact and one broken contact from radicale, directly as radicale serves it to davdroid (captured via wireshark):

    BEGIN:VCARD
    VERSION:3.0
    PRODID:-//Inverse inc.//SOGo Connector 1.0//EN
    UID:C5E444C6-11E0-0001-6EDC-120097FCF570
    N:Humbel;Dumbel
    FN:Humbel Dumbel
    TEL;TYPE=home:012-110-10530
    TEL;TYPE=cell:013-176-43175
    X-MOZILLA-HTML:FALSE
    X-RADICALE-NAME:C5E444C6-0440-0001-F5C9-C94018508050.vcf
    END:VCARD
    BEGIN:VCARD
    VERSION:3.0
    PRODID:DAVdroid/0.5.2-alpha (ez-vcard/0.9.0)
    UID:C5E444C6-12B0-0001-D53D-1CA01E122480
    FN:Hambel Dambel
    N:Dambel;Hambel;;;
    TEL;TYPE=home:053-143-69547
    TEL;TYPE=cell:011248700301
    REV:20131228T212032Z
    X-RADICALE-NAME:C5E444C6-0460-0001-46E8-E0C0B29114B9.vcf
    END:VCARD

    Although strangely after one sync with 0.5.4-alpha, all contacts started to crash Contacts. Also 0.5.4-alpha reports "problem with sync" on Contacts despite not logging anything error or stacktrace like in logcat ;[].

    Thanks for your concern!
    Best Regards

    • Dario Ernst

  • developer

    On my test device, these VCards work with CyanogenMod 10.1/Android 4.2.2 (Radicale server). As always, I recommend to completely remove DAVdroid and all its accounts from your device and setting it up again. Did you already try this?



  • Hey,

    thanks for the assurance that this should work. After lots of trying around, i found the solution:

    It seems that some strange legacy data is retained in the Contact-Storage and Calendar-Storage SQLite-DBs even after unsyncing/removing the DavDroid account. I only saw contacts with no names or strange hashes as names in there. I emptied the DBs manually, tried adding davdroid again, and it worked. To find a more user-friendly solution, i then restored my backup of the broken state and solved the problem simply by:

    • Unsync and remove DavDroid Account
    • Go into Settings, Apps, All,
    • Scroll until you see: Contacts, Contact Storage, Calendar, Calendar Storage
    • For each, click, Force-Stop, Clear Data
    • Re-Add DavDroid account

    Then, after the new initial sync, everything was back to normal. Contacts didn't have their old additional numbers that should've been deleted, and editing contacts works again.

    Thanks for your support. This really isn't a DavDroid bug after all ;). But i hope this helps future users to solve this problem if they run into it.
    Also, Thanks for your great work!

    • Dario Ernst

  • developer

    Thanks for figuring this out so that I can close this issue.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.