Hi, looks like upgrading to latest version of egroupware 14 fixed the issue.
Contacts app crashes (NPE) on editing davdroid contact
- open the default android (4.1) contacts app
- open a contact which origins from a davdroid account
- tap on the edit button
- 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
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.
Is it possible that these contacts don’t have a display name or structured name?
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):
PRODID:-//Inverse inc.//SOGo Connector 1.0//EN
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!
- Dario Ernst
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?
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
Thanks for figuring this out so that I can close this issue.