Bug 123869 - kicker crashs after start program with alt+f2
Summary: kicker crashs after start program with alt+f2
Status: RESOLVED FIXED
Alias: None
Product: kicker
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Aaron J. Seigo
URL:
Keywords:
: 125134 125160 127378 132036 134230 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-18 22:45 UTC by sts
Modified: 2006-09-17 23:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kicker crash after exit kde session (1.34 KB, text/plain)
2006-03-19 15:34 UTC, sts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sts 2006-03-18 22:45:37 UTC
Version:           3.5.1 (using KDE 3.5.1 Level "a" , SUSE 10.1)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16-rc6-git1-4-smp

but at the moment I can't reproduce it.

here the output:

Überprüfung der Systemkonfiguration beim Start deaktiviert.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1230992544 (LWP 25807)]
[KCrash handler]
#6  0x089872d8 in ?? ()
#7  0xb6173788 in TaskBar::filteredContainers (this=0x819c118)
    at taskbar.cpp:969
#8  0xb6181bef in TaskBar::reLayout (this=0x819c118) at taskbar.cpp:637
#9  0xb6184114 in TaskBar::qt_invoke (this=0x819c118, _id=83, _o=0xbf8bbb18)
    at taskbar.moc:178
#10 0xb74f700d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#11 0xb74f77cd in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#12 0xb782fec9 in QTimer::timeout () from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0xb751a36f in QTimer::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0xb7497d57 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0xb7498a01 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0xb7b1f3b3 in KApplication::notify (this=0x8078020, receiver=0x819c1e8, 
    event=0xbf8bbdb4) at kapplication.cpp:552
#17 0xb748cdc5 in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0xb74479e0 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0xb74aea68 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0xb74ae8fe in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0xb74977ef in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0xb6789876 in kdemain (argc=1, argv=0x8073510) at main.cpp:146
#23 0xb7f39524 in kdeinitmain (argc=1, argv=0x8073510)
    at kdeinit_kicker.la.cpp:3
#24 0x0804e39f in launch (argc=1, _name=0x807307c "kicker", args=0x8073083 "", 
    cwd=0x0, envc=0, envs=0x8073087 "", reset_env=false, tty=0x0, 
    avoid_loops=false, startup_id_str=0x80508a2 "0") at kinit.cpp:639
#25 0x0804eae9 in handle_launcher_request (sock=8) at kinit.cpp:1205
#26 0x0804efbf in handle_requests (waitForPid=0) at kinit.cpp:1406
#27 0x0804f7f7 in main (argc=2, argv=0xbf8bc8c4, envp=0xbf8bc8d0)
    at kinit.cpp:1850
#28 0xb6f8d87c in __libc_start_main () from /lib/libc.so.6
#29 0x0804b7b1 in _start ()
Comment 1 Aaron J. Seigo 2006-03-18 22:50:58 UTC
i believe this was one of the things fixed in 3.5.2. can you try again when 3.5.2 is released (it was tagged in svn yesterday) to confirm? be sure to run the same app you start with alt+f2. thanks.
Comment 2 sts 2006-03-19 15:34:40 UTC
Created attachment 15197 [details]
kicker crash after exit kde session

I'm not sure its a new bug report..
Comment 3 Aaron J. Seigo 2006-03-19 18:16:23 UTC
the backtrace you attached is a different problem, but already reported. some have reported it goes away upon upgrading gcc/glibc, but we're still investigating it.
Comment 4 Andreas Kling 2006-07-24 01:20:30 UTC
*** Bug 125134 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Kling 2006-07-24 01:20:39 UTC
*** Bug 125160 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Kling 2006-08-08 07:06:04 UTC
*** Bug 132036 has been marked as a duplicate of this bug. ***
Comment 7 Andreas Kling 2006-08-09 01:13:43 UTC
SVN commit 571260 by kling:

Fixed a hairy problem with nested event loops deleting objects at inappropriate times.
May solve other bugs that I'm not currently aware of.

BUG: 123869


 M  +25 -6     taskbar.cpp  
 M  +1 -0      taskbar.h  
 M  +9 -0      taskcontainer.cpp  
 M  +2 -0      taskcontainer.h  


--- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.cpp #571259:571260
@@ -419,7 +419,8 @@
     {
         if ((*it)->contains(task))
         {
-            (*it)->deleteLater();
+            (*it)->finish();
+            m_deletableContainers.append(*it);
             m_hiddenContainers.erase(it);
             break;
         }
@@ -455,7 +456,8 @@
         }
 
         removeChild(container);
-        container->deleteLater();
+        container->finish();
+        m_deletableContainers.append(container);
 
         reLayoutEventually();
         emit containerCountChanged();
@@ -479,7 +481,8 @@
 
             if ((*it)->isEmpty())
             {
-                (*it)->deleteLater();
+                (*it)->finish();
+                m_deletableContainers.append(*it);
                 m_hiddenContainers.erase(it);
             }
 
@@ -520,7 +523,8 @@
 
     // startup containers only ever contain that one item. so
     // just delete the poor bastard.
-    container->deleteLater();
+    container->finish();
+    m_deletableContainers.append(container);
     reLayoutEventually();
     emit containerCountChanged();
 }
@@ -636,6 +640,19 @@
 
 void TaskBar::reLayout()
 {
+    // Because QPopupMenu::exec() creates its own event loop, deferred deletes
+    // via QObject::deleteLater() may be prematurely executed when a container's
+    // popup menu is visible.
+    //
+    // To get around this, we collect the containers and delete them manually
+    // when doing a relayout. (kling)
+    if (!m_deletableContainers.isEmpty()) {
+        TaskContainer::List::iterator it = m_deletableContainers.begin();
+        for (; it != m_deletableContainers.end(); ++it)
+            delete *it;
+        m_deletableContainers.clear();
+    }
+
     // filter task container list
     TaskContainer::List list = filteredContainers();
 
@@ -920,7 +937,8 @@
          it != lastContainer;
          ++it)
     {
-        (*it)->deleteLater();
+        (*it)->finish();
+        m_deletableContainers.append(*it);
     }
     m_hiddenContainers.clear();
 
@@ -928,7 +946,8 @@
          it != containers.constEnd();
          ++it)
     {
-        (*it)->deleteLater();
+        (*it)->finish();
+        m_deletableContainers.append(*it);
     }
     containers.clear();
 
--- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.h #571259:571260
@@ -117,6 +117,7 @@
     ArrowType 			arrowType;
     TaskContainer::List		containers;
     TaskContainer::List		m_hiddenContainers;
+    TaskContainer::List		m_deletableContainers;
     PixmapList			frames;
     int                         maximumButtonsWithoutShrinking() const;
     bool                        shouldGroup() const;
--- branches/KDE/3.5/kdebase/kicker/taskbar/taskcontainer.cpp #571259:571260
@@ -1579,3 +1579,12 @@
     data.icon = pixmap;
     data.direction = KickerLib::arrowToDirection(arrowType);
 }
+
+void TaskContainer::finish()
+{
+    if (m_menu) {
+        m_menu->close();
+        m_menu->deleteLater();
+        m_menu = 0;
+    }
+}
--- branches/KDE/3.5/kdebase/kicker/taskbar/taskcontainer.h #571259:571260
@@ -85,6 +85,8 @@
 
     void updateKickerTip(KickerTip::Data&);
 
+    void finish();
+
 signals:
     void showMe(TaskContainer*);
 
Comment 8 Andreas Kling 2006-08-09 23:28:37 UTC
*** Bug 127378 has been marked as a duplicate of this bug. ***
Comment 9 Timothée Lecomte 2006-08-12 00:49:32 UTC
I have been running kde with the above patch for two days, and unfortunately kicker has just crashed again with a very similar backtrace (sorry I still did not build it with -g). Here is the backtrace:

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb7096b35 in __malloc_initialize_hook () from /lib/libc.so.6
#7  0xb6436710 in TaskBar::filteredContainers () from /usr/lib/libtaskbar.so.1
#8  0xb6437db8 in TaskBar::reLayout () from /usr/lib/libtaskbar.so.1
#9  0xb6438645 in TaskBar::qt_invoke () from /usr/lib/libtaskbar.so.1
#10 0xb74fb0ce in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#11 0xb74fb518 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#12 0xb78b96af in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#13 0xb7521a4a in QTimer::event () from /usr/lib/libqt-mt.so.3
#14 0xb748db71 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#15 0xb748e5b8 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#16 0xb7b9d98d in KApplication::notify () from /usr/lib/libkdecore.so.4
#17 0xb748177c in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#18 0xb742965f in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#19 0xb74a71fb in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#20 0xb74a7106 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#21 0xb748d609 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#22 0xb6783abb in kdemain () from /usr/lib/libkdeinit_kicker.so
#23 0xb726b4f6 in kdeinitmain () from /usr/lib/kde3/kicker.so
#24 0x0804de60 in kdeinit_x_errhandler ()
#25 0x0804e42d in kdeinit_x_errhandler ()
#26 0x0804e853 in kdeinit_x_errhandler ()
#27 0x0804f5cb in kdeinit_x_errhandler ()
#28 0xb6fc1015 in __libc_start_main () from /lib/libc.so.6
#29 0x0804c2f1 in ?? ()
Comment 10 Andreas Kling 2006-09-17 23:02:07 UTC
*** Bug 134230 has been marked as a duplicate of this bug. ***