Bug 126593

Summary: System freeze: While autocompletion of combobox is open and kwallet comes up kde stops responding
Product: [Unmaintained] kdelibs Reporter: gmud <geroxp>
Component: kwalletAssignee: George Staikos <staikos>
Status: RESOLVED FIXED    
Severity: major CC: bugs.kde.org, kde, kkrizka, l.lunak, pgquiles, prigault, yuriy.kozlov
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description gmud 2006-05-02 10:12:23 UTC
Version:           3.5.2 (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

KDE freezes while kwallet and kwin(?) try to get the focus.

How to reproduce:
1. Open Konqueror
2. Open Kontact/Kmail
3. Immedeatly begin to type an url into konquerors address combo (an url which is known by konqueror) while kontact/kmail is loading (the auto-complete combobox will be shown)
4. If you saved your password for kmail in kwallet, it will show up to ask you for the kwallet password.
5. Now the system freezes.

It seems that the autocompletion of konquerors address combo and kwallet "fight" to get the focus. I had to go to another console to kill kwin, konqueror and kwallet.
Comment 1 Thiago Macieira 2006-05-18 19:23:37 UTC
*** Bug 127163 has been marked as a duplicate of this bug. ***
Comment 2 Chris Howells 2006-05-22 21:39:00 UTC
Upping the severity, this has caught me a few times and is as bad as crash.
Comment 3 Lubos Lunak 2006-08-01 17:26:45 UTC
*** Bug 130858 has been marked as a duplicate of this bug. ***
Comment 4 Lubos Lunak 2006-08-01 17:30:56 UTC
SVN commit 568553 by lunakl:

Use DCOP transaction even for synchronous open.
KWallet has pretty bad reentrancy problems.
BUG: 126593
CCMAIL: staikos@kde.org



 M  +8 -25     kwalletd.cpp  


--- branches/KDE/3.5/kdelibs/kio/misc/kwalletd/kwalletd.cpp #568552:568553
@@ -260,31 +260,14 @@
 	KWalletTransaction *xact = new KWalletTransaction;
 	_transactions.append(xact);
 
-	if (_transactions.count() > 1) {
-		xact->appid = appid;
-		xact->client = callingDcopClient();
-		xact->transaction = xact->client->beginTransaction();
-		xact->wallet = wallet;
-		xact->wId = wId;
-		xact->tType = KWalletTransaction::Open;
-		return 0; // process later
-	}
-
-	int rc = doTransactionOpen(appid, wallet, wId);
-
-	_transactions.remove(xact);
-
-	if (rc < 0) {
-		// multiple requests from the same client should not produce multiple password dialogs on a failure
-		for (KWalletTransaction *x = _transactions.first(); x; x = _transactions.next()) {
-			if (appid == x->appid && x->tType == KWalletTransaction::Open && x->wallet == wallet && x->wId == wId)
-				x->tType = KWalletTransaction::OpenFail;
-		}
-	}
-
-	processTransactions();
-
-	return rc;
+	xact->appid = appid;
+	xact->client = callingDcopClient();
+	xact->transaction = xact->client->beginTransaction();
+	xact->wallet = wallet;
+	xact->wId = wId;
+	xact->tType = KWalletTransaction::Open;
+	QTimer::singleShot(0, this, SLOT(processTransactions()));
+	return 0; // process later
 }
 
 
Comment 5 Lubos Lunak 2006-08-30 14:22:07 UTC
*** Bug 131503 has been marked as a duplicate of this bug. ***
Comment 6 Lubos Lunak 2006-08-30 14:33:39 UTC
*** Bug 69495 has been marked as a duplicate of this bug. ***
Comment 7 Tommi Tervo 2006-10-24 18:08:09 UTC
*** Bug 122752 has been marked as a duplicate of this bug. ***
Comment 8 Pau Garcia i Quiles 2006-10-24 21:55:42 UTC
As of KDE 3.5.5, this still happens
Comment 9 Lubos Lunak 2006-12-15 16:27:27 UTC
*** Bug 102464 has been marked as a duplicate of this bug. ***
Comment 10 Boyd Stephen Smith Jr. 2007-03-05 20:22:17 UTC
I encountered this bug on Kubuntu Feisty.
Comment 11 Boyd Stephen Smith Jr. 2007-06-18 23:17:09 UTC
I'm still seeing this bug (as part of bug 102464) in Kubuntu Gutsy, KDE 3.5.7.  Please reopen.
Comment 12 Lubos Lunak 2007-06-20 11:45:05 UTC
Using exactly the same steps to reproduce?
Comment 13 Yuriy Kozlov 2008-04-19 21:40:04 UTC
This has been filed at https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/219466
with similar steps to reproduce.

From that report:
"now when I open a website that requires a stored password from the secured wallet, and then instantly (before prompted for the wallet password) open another tab and try to choose any stored URL, if you prompted for wallet password while you are trying to choose a stored URL the whole x session will freeze ! and there is no way to avoid CTRL+ALT+Backspace or even (sometimes) CTRL+ALT+DEL !"