Bug 260865 - Addresseelinedit completion freezes Input field in bad connection szenario
Summary: Addresseelinedit completion freezes Input field in bad connection szenario
Status: VERIFIED FIXED
Alias: None
Product: KDE PIM Mobile
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Windows CE Microsoft Windows CE
: HI major
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 11:45 UTC by Andre Heinecke
Modified: 2011-03-02 14:34 UTC (History)
2 users (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 Andre Heinecke 2010-12-21 11:45:20 UTC
Steps to reproduce

1) Be online
2) Open Kaddressbook or the Mailcomposer
3) Enter some characters in the address field
 You should now see completion popup
4) Go offline
5) Enter some more characters

-> Linedit freezes for a while (~15-20 seconds) after that you can edit again.

You can also reproduce this when entering an address on a slow internet connection, after each character you have to wait several seconds before you can type the next.

Expected:
Regardless of background searches the linedit should accept input and not freeze on a connection loss.
Comment 1 Tobias Koenig 2010-12-21 13:15:57 UTC
Hej Andre,

with 'go offline' you mean shutdown the network connection or select 'Work offline' in the context actions?

Ciao,
Tobias
Comment 2 Andre Heinecke 2010-12-21 15:20:53 UTC
Shutdown the network connection.
Comment 3 Ludwig Reiter 2011-01-14 13:23:09 UTC
correct OS.
Comment 4 Ludwig Reiter 2011-01-14 13:28:29 UTC
Windows CE version 20110112 old akonadi agent server.
Don't see the address completion popup in the composer receiver tab.
Entered some letters. Nothing happens. The mobile was online.
Comment 5 Andre Heinecke 2011-02-15 17:58:06 UTC
I am reopening this bug as i belive it is still valid and the test from Comment #4 that caused this bug to be set to resolved did not test the original scenario.

The steps to reproduce from this bugs description are no longer valid since the online/offline status is now known correctly by the application. But i expect this problem still to exist under bad connection scenarios. (Where the device is technically online but has lots of packet loss and a very high latency)

I've assigned this bug to me to give it a retest.
Comment 6 Andre Heinecke 2011-02-23 12:12:26 UTC
Still valid, if the connection to the server is bad, it appears that the addresselineedit freezes up until it gets an answer.
Comment 7 Andre Heinecke 2011-02-23 17:56:30 UTC
In my current test the device completly froze i was not even able to turn it off by hitting the shutdown button. Here is the debug output surrunding that:


004768/1//kmail-mobile(198485930)/ void __cdecl KPIM::AddresseeLineEdit::Private::slotAkonadiSearchResult(class KJob *): Found 0 groups 
004769/1//kmail-mobile(198485930)/ class QString __cdecl KuitSemanticsPrivate::semanticToVisualText(const class QString &,Kuit::Fmt::Var,Kuit::Fmt::Var) const: "Markup error in message {<kuil><interface>An:</interface><nl/>&nbsp;&nbsp;aheinecke@intevation.de<br/></k[...]
004769/1//ð):
004772/3//search done "strigisearch5447" 
004772/1//ø):
004775/1//ì):
004775/1//ü):
004775/1//kmail-mobile(198485930)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
004775/1//kmail-mobile(198485930)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
004775/1//kmail-mobile(198485930)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass?sub?%28%26%28%7C%28objectclass%3Dperson%29%28objectclass%3DgroupOfNames%29%2[...]
004775/1//ø):
004775/1//kmail-mobile(198485930)/ void __cdecl KLDAP::LdapClient::startQuery(const class QString &): LdapClient: Doing query: "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass?sub?%28%26%28%7C%28objectclass%3Dperson%29%28objectclass[...]
004775/1//ô):ü):
004775/1//kmail-mobile(198485930)/ void __cdecl KLDAP::LdapClientSearch::startSearch(const class QString &): LdapClientSearch::startSearch() "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=aheinecke@intevation.de*)(mail=aheinecke@intevation.de*)(mai[...]
004775/1//kmail-mobile(198485930)/ void __cdecl KLDAP::LdapQueryJob::start(void): 
004775/1//ì):
Comment 8 Andre Heinecke 2011-02-23 18:36:19 UTC
And another one, this one is a bit more clear in my opionion:
Waiting -1 msecs for result?

04/1//Èi
010906/1//kmail-mobile(1250103102)/ class QString __cdecl KuitSemanticsPrivate::semanticToVisualText(const class QString &,Kuit::Fmt::Var,Kuit::Fmt::Var) const: "Markup error in message {<kuil><interface>An:</interface><nl/>&nbsp;&nbsp;aheine<br/></kuil>}: Entity 'n[...]
010906/1//ð)=
010906/1//kmail-mobile(1250103102)/ void __cdecl KPIM::AddresseeLineEdit::Private::akonadiHandlePending(void): Pending items:  0 
010912/1//ì)=
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org??base" 
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?" 
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass" 
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass?sub" 
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapUrl::updateQuery(void): LDAP URL updateQuery(): "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass?sub?%28%26%28%7C%28objectclass%3Dperson%29%28objectclass%3DgroupOfNames%29%[...]
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapClient::startQuery(const class QString &): LdapClient: Doing query: "ldap://demo.kolab.org:389dc=demo,dc=kolab,dc=org?cn,mail,givenname,sn,objectClass?sub?%28%26%28%7C%28objectclass%3Dperson%29%28objectclas[...]
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//ü)=
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapClientSearch::startSearch(const class QString &): LdapClientSearch::startSearch() "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=aheine*)(mail=aheine*)(mail=*@aheine*)(givenName=aheine*)(s[...]
010912/1//kmail-mobile(1250103102)/ void __cdecl KLDAP::LdapQueryJob::start(void): 
010912/1//kmail-mobile(1250103102)/ class QString __cdecl KUrl::path(enum KUrl::AdjustPathOption) const:  "dc=demo,dc=kolab,dc=org" 
010912/1//kmail-mobile(1250103102)/ int __cdecl KLDAP::LdapOperation::search(const class KLDAP::LdapDN &,KLDAP::LdapUrl::Scope,const class QString &,const class QStringList &): asyncSearch() base=" "dc=demo,dc=kolab,dc=org" " scope= 2 filter=" "(&(|(objectclass=pers[...]
010913/1//kmail-mobile(1250103102)/ int __cdecl KLDAP::LdapOperation::waitForResult(int,int): ( 8 , -1 ): Waiting -1 msecs for result. Attempt # 1
Comment 9 Tobias Koenig 2011-02-28 09:39:25 UTC
The LDAP query code should be executed in its own thread, so even if it blocks in KLDAP::LdapOperation::waitForResult, it shouldn't block the complete application.
Comment 10 Andre Heinecke 2011-02-28 10:26:38 UTC
I agree that having it in a thread is neccessary so that latencies do not freeze the application, but for the blocking i do not know if this will help.

Since it does not block only our application but in fact the complete device (Can only be unblocked by taking out the battery), i wonder if this is even solved by putting it in a thread.

It might be that because we run our frontends with above normal priority that we run into this fill block. It might as well be that we are running into a problem with the ldap implemenation in Windows CE.
Comment 11 Tobias Koenig 2011-02-28 11:04:54 UTC
Git commit 570542e8f85101ade75a7cad80007fd048dd8585 by Tobias Koenig.
Committed on 28/02/2011 at 11:06.
Pushed by tokoe into branch 'komo3'.

Fix blocking LDAP search queries

Make sure the LDAP search queries are really executed in their
own thread, so that weak network connections or slow servers to
not block the UI.

BUG: 260865

M  +5    -0    libkdepim/ldap/ldapqueryjob.cpp     
M  +3    -0    libkdepim/ldap/ldapqueryjob.h     
M  +1    -1    libkdepim/ldap/ldapsession.cpp     

http://commits.kde.org/kdepim/570542e8f85101ade75a7cad80007fd048dd8585
Comment 12 Andre Heinecke 2011-03-02 14:34:50 UTC
Retested works now on connection loss and even with good connection scenarios you can fluently type in the addresseelinedit.