Bug 250076

Summary: KCModules take a very long time the _second_ time they are loaded
Product: kde-windows Reporter: Peter Grasch <me>
Component: generalAssignee: KDE-Windows <kde-windows>
Status: RESOLVED FIXED    
Severity: normal CC: me, romain, winter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Peter Grasch 2010-09-03 21:00:21 UTC
Version:           CVS (using Devel) 
OS:                MS Windows

Ok first of all the summary is not quite complete: This also happens on each subsequent load. But the first one is as fast as you would expect.

Reproducible: Always

Steps to Reproduce:

I can reproduce this simply by running "kcmshell4 kcm_nepomuk", clicking around and closing the dialog by pressing "Ok". Then, simply run the command again and it will take at least 30 seconds.

If you kill dbus-daemon.exe during that time, the KCM opens instantly. You then again get one "free" fast opening the next time but after that the slowness is back.

Therefore this seems to be related to dbus but as this happens with both dbus 1.2.* and 1.3.* it might as well be a KDE problem.

This of course only happens on windows.

Actual Results:  
Application hangs quite long

Expected Results:  
Configuration opens quickly

This started happening a couple of months back (might be around 4.4.x) but I thought it was a glitch of kde on windows.
Comment 1 Pino Toscano 2010-09-04 01:21:25 UTC
Reassign to the kde-windows guys for investigation.
Comment 2 Romain Pokrzywka (kromain) 2010-09-04 15:59:04 UTC
Please double-check the exact dbus version for which it happens. This was indeed a windows-specific dbus bug with 1.2.x but it has been fixed in 1.3.x and later. Do you build kde-windows through emerge ?
Comment 3 Peter Grasch 2010-09-06 09:44:01 UTC
Yes I am using emerge.

I upgraded again to DBus 1.3.1 by running emerge -i dbus-src. dbus-daemon --version now prints 1.3.1.

I had to move the system.d folder from \kde\etc\dbus-1 to \kde\etc to start applications.

The freeze is still present, tough.

I am recompiling kdelibs right now (related to a different bug) so I can't really try anything right now but so far it doesn't seem that it changed anything....
Comment 4 Peter Grasch 2010-09-06 15:08:35 UTC
It seems as if the dbus upgrade improved the situation but it didn't fix it. Or the problem lies in the attica kcm...

F:\kde>dbus-daemon --version
D-Bus Message Bus Daemon 1.3.1
Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
URPOSE.

Steps to reproduce: 
kcmshell4 kcm_attica
Set your username > Ok
kcmshell4 kcm_attica
Hangs

Killing dbus-daemon shows the kcm (but then it doesn't show any service providers).

Regards,
Peter
Comment 5 Peter Grasch 2010-09-06 17:55:49 UTC
It seems that my application (simon) that uses the attica kcm is very receptive for this behaviour. I uploaded a current prototype (windows installer binary) that uses dbus 1.3.x that still emits this behaviour to help troubleshooting.

The installer contains DBus, KDE, etc. so to reproduce the bug just install it, run it (if you don't uncheck it simon starts automatically after the installation). Skip the first run wizard (cancel), click around a bit in the settings, close the application start it again and go into the settings again. It should hang.

Any help would be greatly appreciated.

Regards,
Peter
Comment 6 Peter Grasch 2010-09-06 18:18:45 UTC
Sorry I forgot the URL of the installer: http://hotfile.com/dl/67465166/cfe1be5/simon-0.3-win32.exe.html
Comment 7 Romain Pokrzywka (kromain) 2010-10-06 00:23:59 UTC
Problem fixed with latest dbus-src package from emerge (1.4.0 based).

I stand corrected... after testing 1.3.1 had a regression on this bug, and 1.4.0 still has it, so I had to apply another fix to solve the issue.

Note that the fix for 1.4.x is still pending for inclusion upstream, so building dbus from freedesktop's git won't have the fix before another couple of days, currently only emerge has the patch applied.
Comment 8 Romain Pokrzywka (kromain) 2010-10-06 00:24:45 UTC
nb: sorry I couln't mark the bug as resolved, probably because I'm not in the kde-windows group or something. Somebody else do it for me please :)
Comment 9 Allen Winter 2010-10-06 00:28:24 UTC
I happy to resolve this for Romain.