Bug 236247 - Local Folders sometimes duplicated
Summary: Local Folders sometimes duplicated
Status: VERIFIED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: VHI normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: akonadi-ports-regression
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-05-03 23:27 UTC by Thomas McGuire
Modified: 2010-07-05 00:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2010-05-03 23:27:32 UTC
There is no clear way to reproduce, but it often happens (not just for me) that the Local Folders resource is duplicated, and KMail shows two or more local folder trees (each with the same data).
Comment 1 David Faure 2010-05-11 22:31:19 UTC
Seems to come from the maildispatcher_agent. I saw this in its debug output:

Akonadi::DefaultResourceJobPrivate::tryFetchResource: Read defaultResourceId "akonadi_maildir_resource_12" from config.
Akonadi::DefaultResourceJobPrivate::tryFetchResource: Creating maildir resource.
Akonadi::DefaultResourceJobPrivate::resourceCreateResult: Created maildir resource with id "akonadi_maildir_resource_13"

...but there was already a maildir resource running, the _11 one.
So it looks like it wanted to find 12, didn't find it, and created 13, instead of using 11.
The reason for "11 vs 12" was that there were two and sabine deleted the "12" one though.
Comment 2 Sabine Faure 2010-05-19 00:24:15 UTC
A duplicate of the Local Folders appears randomly while doing nothing on the computer (I was away and when I came back I had two of them).

It is impossible to reproduce on purpose and at will at the moment.

However both 'Local Folders' cannot work simultaneously. One as to be removed:
- Go to Settings menu/Configure Kmail and click on Accounts
- Delete the offline 'Local Folders' if there is one otherwise delete both of them.
- A new 'Local Folders' is automatically created
- Click on 'Ok'

Trunk, Svn Rev 1128166
Comment 3 Sabine Faure 2010-05-19 00:34:54 UTC
For the emails to be stored properly again in the sent-mail folder once sent follow those steps:
- Go to Settings menu/Configure Kmail and click on Identities
- Double click on your set identity 
- A pop up error message appears: 'The custom sent-mail folder for identity
'IdentityName' does not exist (anymore); therefore, the default sent-mail
folder will be used.
- Click on 'Ok'
- One message per folder from the default 'Local Folders' folders will appear
saying the same (ex: drafts, templates...)
- Click on 'Ok' several time and close the Configure dialogue when done
- Quit and relaunch Kmail
- Sent emails are stored in the 'sent-email' folder again as they should.

Trunk, Svn Rev 1128166
Comment 4 Sabine Faure 2010-05-19 00:52:29 UTC
I reported bug #238056 about storing the sent emails in the sent-email folder again (ref comment 3 above) so that the two bugs are dissociated.

Trunk, Svn Rev 1128166
Comment 5 Leo Franchi 2010-06-03 15:55:24 UTC
I believe this was fixed recently too, and I have not had multiple local folder collections in a few weeks.

can anyone still reproduce the problem?
Comment 6 Thomas McGuire 2010-06-03 16:31:27 UTC
Just happened to me again.
Apparently happens when you start KMail when Akonadi and KDE is not yet running. Then KMail triggers KDE and Akonadi startup, which takes a long time, and that seems to trigger a race.

Startup log at http://pastebin.com:80/6pn3YPFT
Comment 7 Leo Franchi 2010-06-08 01:20:59 UTC
SVN commit 1135698 by lfranchi:

Only init folders if Akonadi is in a running state. If not, wait until the ServerManager tells us that Akonadi has finished starting, and then init the local folders.

CCBUG: 236247


 M  +18 -1     kmail/kmkernel.cpp  
 M  +3 -1      kmail/kmkernel.h  
 M             messagecomposer/tests/gnupg_home/random_seed  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1135698
Comment 8 Leo Franchi 2010-06-08 01:21:05 UTC
SVN commit 1135699 by lfranchi:

Update agent instances as well as agent types when owner changes, this way when the AgentManager is created before the Akonadi.Control DBus interface, it will learn about new instances as well.

BUG: 236247


 M  +17 -2     agentmanager.cpp  
 M  +7 -0      agentmanager_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1135699
Comment 9 Sabine Faure 2010-07-05 00:23:05 UTC
This has not happened in a while now so I am verifying this bug.

Trunk, Svn Rev 1145265