Bug 154960 - Check mail from imap pauses at 95% "Getting quota information"
Summary: Check mail from imap pauses at 95% "Getting quota information"
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.9.50
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 157744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-02 08:38 UTC by Ryan Winter
Modified: 2008-02-24 01:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Winter 2008-01-02 08:38:54 UTC
Version:           1.9.50 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

This occurs for both gmail imap, and a local cyrus imap account. Triggering a check mail in folder results in the progress reaching 95% "Getting quota information", and then staying in this state until cancelled.
Comment 1 Thomas McGuire 2008-01-02 18:58:35 UTC
My guess is that this is the incorrect connect the compiler complains about, in quotajobs.cpp (actually the compiler complains about an overloaded virtual, but that is the same issue basically)
I don't know enough about IMAP yet to fix this myself.

Ryan, do you want to have a look? Your last patch already was great, it would be good to get more developers.
Comment 2 Ryan Winter 2008-01-02 23:09:11 UTC
Hi Thomas,

I had a quick look and thought the same, seems to be one of the callbacks failing.  I'll take a look tonight and see if I can figure something out :)
Comment 3 Ryan Winter 2008-01-05 07:03:00 UTC
Hey all,

I've been investigating into this bug am I quite confused. The QuotaJobs::GetStorageQuotaJob isn't emitting the result signal which causes the KMFolderCachedImap object to progress the progress. Fixing up the broken signal didn't make a difference. It seems the result() signal is emitted when the emitResult() function is called however this was removed in revision 527075 (http://websvn.kde.org/trunk/KDE/kdepim/kmail/quotajobs.cpp?r1=504943&r2=527075) as it was emitting duplicate signals.

Does anyone know more about the KIO::Job class to tell me if you need to call the emitResult() function manually, or does this class somehow trigger this automatically?

Ryan
Comment 4 Thomas McGuire 2008-01-06 21:09:16 UTC
I don't know much about the job classes myself.
Here are some observations. As I don't have IMAP myself, I can not test anything. Maybe you can put together the pieces.

1.
KCompositeJob already has a slotInfoMessage function, which is even virtual. These could mean that the slotInfoMessage in QuotaJob is supposed to override that. Also, the signature of slotInfoMessage changed: Before, it was in another class (in jobclasses.h) and had only two arguments, now it is in KCompositeJob (which is new) and has an additional argument

http://websvn.kde.org/?view=rev&revision=558448 http://api.kde.org/4.0-api/kdelibs-apidocs/kdecore/html/classKCompositeJob.html

2.
In the enterprise branch, which probably works correctly, there is also no emitResult.
See 
http://websvn.kde.org/branches/kdepim/enterprise/kdepim/kmail/quotajobs.cpp?revision=631694&view=markup

>Does anyone know more about the KIO::Job class to tell me if you need to call the emitResult() function manually, or does this class somehow trigger this automatically? 
Till told me it is emitted automatically. You can probably place a breakpoint in slotQuotaResult of kmfoldercachedimap and find out when it is emitted (using the 3.5 or enterprise branch).

I think (but I might be wrong) that slotInfoMessage is supposed to be called automatically whenever a subjob emits the infoMessage signal. See the code for KCompositeJob::addSubjob, which does that. That would explain why it doesn't work in QuotaJob, since that wasn't adopted to the new slotInfoMessage signature.
I do wonder why a connect for infoMessage/slotInfoMessage is done in QuotaJob at all then...

Generally I suggest using GDB to debug the problem. Place a breakpoint in slotInfoMessage and see if it is called at all. If not, find out why...
Comment 5 Kovid Goyal 2008-01-15 21:43:11 UTC
This bug makes kmail unusable with IMAP accounts, so I'd like to request it be fixed ASAP.
Comment 6 David Lonie 2008-01-21 04:32:42 UTC
*** This bug has been confirmed by popular vote. ***
Comment 7 Dariusz Dworznik 2008-01-27 11:05:49 UTC
same here.. imap unusable. 
Comment 8 Thomas McGuire 2008-02-14 17:40:12 UTC
*** Bug 157744 has been marked as a duplicate of this bug. ***
Comment 9 Thomas McGuire 2008-02-24 01:39:50 UTC
SVN commit 778618 by tmcguire:

Don't get stuck when receiving quota info for dimap.
A emitResult() was missing.

BUG: 154960


 M  +5 -8      quotajobs.cpp  
 M  +1 -10     quotajobs.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=778618