possible patch for endless hanging resources

Martin Koller kollix at aon.at
Mon Apr 17 19:26:14 BST 2017


Hi,

I'm trying to find a solution for resources (in my case maildir) showing "please wait" when retrieving
an email but never finishing.

I found out that this is easily reproducible when - for whatever reason - there is a duplicate remoteId
in the database.

What happens here is that the maildir resource is asked for an item via MaildirResource::retrieveItems()
which it loads from disk and calls the baseclass ResourceBase::itemsRetrieved(rv).
Inside this, ItemCreateJobs are created and sent to the Akonadi Server.

The Server however finds the "Multiple remote Ids" in AkAppend::parseStream(), and returns false.
This error however results in the resource in ResourceBasePrivate::slotItemSyncDone()
just emitting the error via emit q->error(job->errorString());
but what seems to be missing is a DBUS reply being sent to kmail, so it waits forever on a feedback ...

I'm using now the following simple fix, which solves the problem.

diff --git a/src/agentbase/resourcebase.cpp b/src/agentbase/resourcebase.cpp
index 0cc6ab282..845645df2 100644
--- a/src/agentbase/resourcebase.cpp
+++ b/src/agentbase/resourcebase.cpp
@@ -1363,7 +1363,8 @@ void ResourceBasePrivate::slotItemSyncDone(KJob *job)
     Q_Q(ResourceBase);
     if (job->error() && job->error() != Job::UserCanceled) {
         emit q->error(job->errorString());
-    } else if (scheduler->currentTask().type == ResourceScheduler::FetchItems) {
+    }
+    if (scheduler->currentTask().type == ResourceScheduler::FetchItems) {
         scheduler->currentTask().sendDBusReplies(QString());
     }
     scheduler->taskDone();


Do you think this is the correct fix ?

-- 
Best regards/Schöne Grüße

Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\                        - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at



More information about the kde-pim mailing list