Bug 357266

Summary: Dangerous design problem for kaddressbook groups in case ~/.local/share/akonadi/ is blown away
Product: [Applications] kaddressbook Reporter: David Tonhofer <bughunt>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: major CC: kdebugs, tokoe
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Tonhofer 2015-12-28 17:08:58 UTC
Suppose you get a dumbass attack and blow away the Akonadi database in

~/.local/share/akonadi/ 

On restart, akonadi rebuilds the database.

The basic contacts in kaddressbook are all fine.

However, the *groups* now contain random contacts (embarrasing if you don't notice and use them without verification) or result in kaddressbook crashing when opened.

This might be due to kaddressbook setting up groups using small-int identifiers into the Akonadi database (maybe?) instead of using UUIDs that would make it clear that the original contact entry has just gone away.

It should be clear to Akonadi that the group has become dangerously messed up and no longer contain valid references. Safety first etc.

P.S.

This problem also occurs with the configuration of IMAP accounts (trash/draft/template folders and sending identities) - kmail starts up and does not complain at all but is all messed up underneath instead of insulting the issue with clear error messages.

P.S.

(The version of "kaddressbook" is "4.14.10.-7" which is not listed in Version (it stops at 4.13.2)??)

Reproducible: Always

Steps to Reproduce:
I will have to reproduce it in actuality, but the steps would be:

1. Destroy ~/.local/share/akonadi/ 
2. Restart
3. kaddressbook contacts messed up