[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Kicker crash with compiz
From:       Andras Mantia <amantia () kde ! org>
Date:       2006-05-25 17:39:57
Message-ID: 200605252039.57423.amantia () kde ! org
[Download RAW message or body]

On Thursday 25 May 2006 20:10, Andras Mantia wrote:
> Isn't it so, that now I cannot reproduce? I will run kicker in
> valgrind as soon as it crashes, I promise.

I was too fast. Kicker does not crash in valgrind, this is the simple 
truth. But it crashes in real life. The full log is attached. First 
there is a crash without valgrind (you can see those X errors), later 
inside  valgrind. There the interesting part starts from the lot of 
"empty" lines:

andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris>
andris@stein:/data/home/andris> ==9679==
==9679== Invalid read of size 8
=

It seems that QXEmbed is indeed deleted and used later. My suspicion is:
QXEmbed line 1056:
emit embeddedWindowDestroyed();

This triggers SystemTrayApplet::updateTrayWindows() which deletes an 
object (and a QXEmbed object as well!). From this line down in QXEmbed 
the object does not exist anymore so sooner or later kicker will crash. 
Maybe using deleteLater instead of "delete *emb;" in 
SystemTrayApplet::updateTrayWindows() is enough. Let's try it...
Yeah, I cannot reproduce anymore. 
Fix attached. I don't claim it fixes all the bugs listed in the report, 
but if you think it is, I commit and close the report (just to get some 
fame). ;-)

Andras


-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

["kicker.log.bz2" (application/x-bzip2)]
["systrayfix.diff" (text/x-diff)]

Index: systemtrayapplet.cpp
===================================================================
--- systemtrayapplet.cpp	(revision 541636)
+++ systemtrayapplet.cpp	(working copy)
@@ -596,7 +596,7 @@
             ((*emb)->kdeTray() &&
              !kwin_module->systemTrayWindows().contains(wid)))
         {
-            delete *emb;
+            (*emb)->deleteLater();
             emb = m_shownWins.erase(emb);
         }
         else
@@ -613,7 +613,7 @@
             ((*emb)->kdeTray() &&
              !kwin_module->systemTrayWindows().contains(wid)))
         {
-            delete *emb;
+            (*emb)->deleteLater();
             emb = m_hiddenWins.erase(emb);
         }
         else


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic