KRunner crashes post-exec

Aaron J. Seigo aseigo at kde.org
Thu May 8 06:44:31 CEST 2008


On Tuesday 06 May 2008, Sebastian Kuegler wrote:
> Lately, KRunner is a bit crashy. I cannot really pin it down to a specific,
> but from time to time it explodes after starting an application. Attached
> is a bt, maybe someone can have a look at it?

there are other similar crashes. what i *think* is happening is this:

* RunnerContext get the matches from threads
* RunnerContext signals there are new matches
* the GUI thread hangs on to ptrs of those matches
* the GUI thread does some work (often in updateMatches) and during this time 
the matches change in the active threads
* boom

essentially the UI is falling out of sync with the threads, which should be 
ok, except that we're deleting pointers in threads that are being used in 
other threads. race condition city.

humerously (or not), now that there are fewer locks (at least in my local 
copy) and things are going faster ... this happens a lot more frequently =/

there are two rational solutions imho:

* making all use of QueryMatch value based
* using smart pointers instead

in prefer the former; i even have a patch on disk here that does it, though it 
doesn't apply anymore. while doing that work, i realized that i really had to 
do other things to krunner first. so i'll re-do the value based QueryMatch 
work sometime in the next day or two and see if that makes things any better.

we're also now emitting the matchesChanged signal too often (e.g. from 
now-useless-runs when the query changes) ... another nut to crack.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080507/a94570e0/attachment.pgp 


More information about the Panel-devel mailing list