Version: 2.0-SVN (using 4.1.3 (KDE 4.1.3), Debian packages) Compiler: cc OS: Linux (x86_64) release 2.6.28 Amarok crashed after choosing "Quit" from the system tray context menu. While doing so, it was playing music with a dynamic playlist, the content pane showed Track and Album applets on the first page, no other applets were loaded. Version: SVN-904519 (2009-01-02) Backtrace (kcrash): Application: Amarok (amarok), signal SIGSEGV [Thread debugging using libthread_db enabled] [New Thread 0x7f85863de730 (LWP 22013)] [New Thread 0x4b239950 (LWP 25200)] [New Thread 0x4aa38950 (LWP 25199)] [New Thread 0x4a237950 (LWP 24146)] [New Thread 0x49a36950 (LWP 24145)] [New Thread 0x48a34950 (LWP 22572)] [New Thread 0x47231950 (LWP 22571)] [New Thread 0x48233950 (LWP 22377)] [New Thread 0x47a32950 (LWP 22376)] [New Thread 0x44a2c950 (LWP 22038)] [New Thread 0x4422b950 (LWP 22033)] [New Thread 0x43a2a950 (LWP 22032)] [New Thread 0x43229950 (LWP 22031)] [New Thread 0x42a28950 (LWP 22029)] [KCrash handler] #5 0x00007f858465b720 in QHashDummyNode (this=0x53e3c50, key0=@0x10) at /usr/include/qt4/QtCore/qhash.h:201 #6 0x00007f858465b775 in QHash<ContextObserver*, QHashDummyValue>::duplicateNode (node=0x0, newNode=0x53e3c50) at /usr/include/qt4/QtCore/qhash.h:500 #7 0x00007f857e33f1f5 in QHashData::detach_helper (this=0x28e45d0, node_duplicate=0x7f858465b72e <QHash<ContextObserver*, QHashDummyValue>::duplicateNode(QHashData::Node*, void*)>, nodeSize=<value optimized out>) at tools/qhash.cpp:203 #8 0x00007f858465b976 in QHash<ContextObserver*, QHashDummyValue>::detach_helper (this=0x28a59b0) at /usr/include/qt4/QtCore/qhash.h:564 #9 0x00007f858465b9dc in QHash<ContextObserver*, QHashDummyValue>::detach ( this=0x28a59b0) at /usr/include/qt4/QtCore/qhash.h:280 #10 0x00007f858465bb87 in QHash<ContextObserver*, QHashDummyValue>::remove ( this=0x28a59b0, akey=@0x7fff8e52e7a0) at /usr/include/qt4/QtCore/qhash.h:762 #11 0x00007f858465bc75 in QSet<ContextObserver*>::remove (this=0x28a59b0, value=@0x7fff8e52e7a0) at /usr/include/qt4/QtCore/qset.h:80 #12 0x00007f858465af9c in ContextSubject::detach (this=0x28a59a8, obs=0x28da4c8) at /home/src/kde/amarok/src/context/ContextObserver.cpp:79 #13 0x00007f858465b248 in ~ContextObserver (this=0x28da4c8) at /home/src/kde/amarok/src/context/ContextObserver.cpp:38 #14 0x00007f85649bb421 in ~CurrentEngine (this=0x28da4b0) at /home/src/kde/amarok/src/context/engines/current/CurrentEngine.cpp:50 #15 0x00007f8581d57d70 in ~DataEngineManagerPrivate (this=0x28e1470) at /home/src/kde/amarok/src/context/plasma/dataenginemanager.cpp:55 #16 0x00007f8581d570ec in ~DataEngineManager (this=0x28e13a0) at /home/src/kde/amarok/src/context/plasma/dataenginemanager.cpp:94 #17 0x00007f8581d58379 in ~DataEngineManagerSingleton (this=0x28e13a0) at /home/src/kde/amarok/src/context/plasma/dataenginemanager.cpp:75 #18 0x00007f8581d5715e in destroy () at /home/src/kde/amarok/src/context/plasma/dataenginemanager.cpp:80 #19 0x00007f8581d1f103 in ~KCleanUpGlobalStatic (this=0x7f858208aad8) at /usr/include/kglobal.h:67 #20 0x00007f857d5ea9cd in exit () from /lib/libc.so.6 #21 0x00007f857d5d41ad in __libc_start_main () from /lib/libc.so.6 #22 0x0000000000401039 in _start () #0 0x00007f857d653ff1 in nanosleep () from /lib/libc.so.6
Yes, I can confirm this crash. It's an old bug, and I'm getting it rarely, but sometimes it happens.
Here comes another backtrace, SVN of 2 Fev 2009, crash happened on exit, but no track was playing: Application: Amarok (amarok), signal SIGSEGV 0x00007f38975cb6e1 in nanosleep () from /lib/libc.so.6 [Current thread is 0 (LWP 9952)] Thread 3 (Thread 0x437fa950 (LWP 9965)): #0 0x00007f38929fb2d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007f38980ac349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4 #2 0x00007f3894b435e4 in ?? () from /usr/lib/libthreadweaver.so.4 #3 0x00007f3894b45d93 in ?? () from /usr/lib/libthreadweaver.so.4 #4 0x00007f3894b4430f in ?? () from /usr/lib/libthreadweaver.so.4 #5 0x00007f3894b44769 in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4 #6 0x00007f38980ab362 in ?? () from /usr/lib/libQtCore.so.4 #7 0x00007f38929f73ea in start_thread () from /lib/libpthread.so.0 #8 0x00007f3897609cbd in clone () from /lib/libc.so.6 #9 0x0000000000000000 in ?? () Thread 2 (Thread 0x43ffb950 (LWP 9966)): #0 0x00007f38929fb2d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007f38980ac349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4 #2 0x00007f3894b435e4 in ?? () from /usr/lib/libthreadweaver.so.4 #3 0x00007f3894b45d93 in ?? () from /usr/lib/libthreadweaver.so.4 #4 0x00007f3894b4430f in ?? () from /usr/lib/libthreadweaver.so.4 #5 0x00007f3894b44769 in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4 #6 0x00007f38980ab362 in ?? () from /usr/lib/libQtCore.so.4 #7 0x00007f38929f73ea in start_thread () from /lib/libpthread.so.0 #8 0x00007f3897609cbd in clone () from /lib/libc.so.6 #9 0x0000000000000000 in ?? () Thread 1 (Thread 0x7f389a5a0700 (LWP 9952)): [KCrash Handler] #5 0x00007f3899a2725c in QHashDummyNode (this=0x1ba9f90, key0=@0xf00007900000022) at /usr/include/qt4/QtCore/qhash.h:201 #6 0x00007f3899a272b1 in QHash<ContextObserver*, QHashDummyValue>::duplicateNode (node=0xf00007900000012, newNode=0x1ba9f90) at /usr/include/qt4/QtCore/qhash.h:500 #7 0x00007f38980cb6a5 in QHashData::detach_helper () from /usr/lib/libQtCore.so.4 #8 0x00007f3899a274b2 in QHash<ContextObserver*, QHashDummyValue>::detach_helper (this=0x188e308) at /usr/include/qt4/QtCore/qhash.h:564 #9 0x00007f3899a27518 in QHash<ContextObserver*, QHashDummyValue>::detach (this=0x188e308) at /usr/include/qt4/QtCore/qhash.h:280 #10 0x00007f3899a276c3 in QHash<ContextObserver*, QHashDummyValue>::remove (this=0x188e308, akey=@0x7fffa276c8a0) at /usr/include/qt4/QtCore/qhash.h:762 #11 0x00007f3899a277b1 in QSet<ContextObserver*>::remove (this=0x188e308, value=@0x7fffa276c8a0) at /usr/include/qt4/QtCore/qset.h:80 #12 0x00007f3899a26ad8 in ContextSubject::detach (this=0x188e300, obs=0x18db9a8) at /home/myriam/kde/src/amarok/src/context/ContextObserver.cpp:79 #13 0x00007f3899a26d84 in ~ContextObserver (this=0x18db9a8) at /home/myriam/kde/src/amarok/src/context/ContextObserver.cpp:38 #14 0x00007f387bf30034 in ~WikipediaEngine (this=0x18db990) at /home/myriam/kde/src/amarok/src/context/engines/wikipedia/WikipediaEngine.cpp:41 #15 0x00007f3894361adb in Plasma::DataEngineManager::~DataEngineManager () from /usr/lib/libplasma.so.3 #16 0x00007f3894361c77 in ?? () from /usr/lib/libplasma.so.3 #17 0x00007f38975596ad in exit () from /lib/libc.so.6 #18 0x00007f389754146d in __libc_start_main () from /lib/libc.so.6 #19 0x0000000000400ea9 in _start ()
Another backtrace, very dubious though (NB: That was after some local changes, it might not be relevant): Thread 1 (Thread 0xb3a176e0 (LWP 26107)): #0 0xb80f0430 in __kernel_vsyscall () #1 0xb69618a0 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb6963268 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb69a5e5d in ?? () from /lib/tls/i686/cmov/libc.so.6 #4 0xb69a7a8d in ?? () from /lib/tls/i686/cmov/libc.so.6 #5 0xb69a8a36 in ?? () from /lib/tls/i686/cmov/libc.so.6 #6 0xb69a9865 in malloc () from /lib/tls/i686/cmov/libc.so.6 #7 0xb6c08f5d in qMalloc () from /usr/lib/libQtCore.so.4 #8 0xb6c12043 in QByteArray::resize () from /usr/lib/libQtCore.so.4 #9 0xb6c9672a in QIODevicePrivate::QIODevicePrivate () from /usr/lib/libQtCore.so.4 #10 0xb6c8dfff in ?? () from /usr/lib/libQtCore.so.4 #11 0xb6c8e4c3 in QFile::QFile () from /usr/lib/libQtCore.so.4 #12 0xb6ecec6b in ?? () from /usr/lib/libkdecore.so.5 #13 0xb6ed0d86 in ?? () from /usr/lib/libkdecore.so.5 #14 0xb6eb8e0e in ?? () from /usr/lib/libkdecore.so.5 #15 0xb6eba1ce in KConfig::reparseConfiguration () from /usr/lib/libkdecore.so.5 #16 0xb6ed5a85 in KCoreConfigSkeleton::readConfig () from /usr/lib/libkdecore.so.5 #17 0xb6ed9cb7 in KCoreConfigSkeleton::writeConfig () from /usr/lib/libkdecore.so.5 #18 0xb7cb62ea in ~SideBarWidget (this=0x95ac988) at /home/mark/kde/src/amarok/src/widgets/SidebarWidget.cpp:74 #19 0xb6d0d0ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 #20 0xb7209928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #21 0xb75402e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4 #22 0xb7fd76b1 in KHBox::~KHBox () from /usr/lib/libkdeui.so.5 #23 0xb7c2acc8 in ~SideBar (this=0x95ac5d8) at /home/mark/kde/src/amarok/src/Sidebar.h:79 #24 0xb6d0d0ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 #25 0xb7209928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #26 0xb75402e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4 #27 0xb75a7483 in QSplitter::~QSplitter () from /usr/lib/libQtGui.so.4 #28 0xb7cbda38 in ~Splitter (this=0x96cb470) at /home/mark/kde/src/amarok/src/widgets/Splitter.cpp:58 #29 0xb6d0d0ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 #30 0xb7208fb8 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #31 0xb6d0d0ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 #32 0xb7209928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #33 0xb755b921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4 #34 0xb7ff1849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5 #35 0xb80343c7 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5 #36 0xb7c298bf in ~MainWindow (this=0x8fde118) at /home/mark/kde/src/amarok/src/MainWindow.cpp:177 #37 0xb7c14e9c in ~App (this=0xbfbef350) at /home/mark/kde/src/amarok/src/App.cpp:241 #38 0x0804bded in main (argc=4, argv=0xbfbef844) at /home/mark/kde/src/amarok/src/main.cpp:129
SVN commit 921999 by markey: Fix one crash on exit, caused by double-freeing QWidgets stored in a private d-pointer class of another QWidget. Dear Amarok devs, please don't _ever_ use d-pointers in QWidgets. Here is an article that explains the dangers of doing so: http://www.purinchu.net/wp/2009/02/04/another-programming-tidbit/ CCMAIL: amarok-devel@kde.org CCBUG: 179400 M +176 -192 SidebarWidget.cpp M +48 -37 SidebarWidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=921999
Next backtrace, _after_ my latest fix (latest trunk). So we have at least one other bug here: Thread 1 (Thread 0xb39c16e0 (LWP 14240)): #0 0xb80a2430 in __kernel_vsyscall () #1 0xb690b8a0 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb690d268 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb694fe5d in ?? () from /lib/tls/i686/cmov/libc.so.6 #4 0xb6951a8d in ?? () from /lib/tls/i686/cmov/libc.so.6 #5 0xb6952a36 in ?? () from /lib/tls/i686/cmov/libc.so.6 #6 0xb6953865 in malloc () from /lib/tls/i686/cmov/libc.so.6 #7 0xb6bb2f5d in qMalloc () from /usr/lib/libQtCore.so.4 #8 0xb6c0925f in QVectorData::malloc () from /usr/lib/libQtCore.so.4 #9 0xb6bf4f77 in ?? () from /usr/lib/libQtCore.so.4 #10 0xb6bf507f in ?? () from /usr/lib/libQtCore.so.4 #11 0xb6beb550 in ?? () from /usr/lib/libQtCore.so.4 #12 0xb6bf472c in QRegExp::operator= () from /usr/lib/libQtCore.so.4 #13 0xb6bf495e in QRegExp::QRegExp () from /usr/lib/libQtCore.so.4 #14 0xb6f9afc2 in ?? () from /usr/lib/libkdecore.so.5 #15 0xb6fa159d in ?? () from /usr/lib/libkdecore.so.5 #16 0xb6fa15d9 in ?? () from /usr/lib/libkdecore.so.5 #17 0xb6f77ad9 in ?? () from /usr/lib/libkdecore.so.5 #18 0xb6f7a3af in ?? () from /usr/lib/libkdecore.so.5 #19 0xb6f7ad64 in KLocalizedString::toString () from /usr/lib/libkdecore.so.5 #20 0xb6ed4e91 in KAboutData::programName () from /usr/lib/libkdecore.so.5 #21 0xb7f0ae54 in ?? () from /usr/lib/libkdeui.so.5 #22 0xb7f0b573 in ?? () from /usr/lib/libkdeui.so.5 #23 0xb7f0b682 in ?? () from /usr/lib/libkdeui.so.5 #24 0xb7ddc68a in KAction::~KAction () from /usr/lib/libkdeui.so.5 #25 0xb6cb70ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 ---Type <return> to continue, or q <return> to quit--- #26 0xb71b3928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #27 0xb7505921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4 #28 0xb7fa3849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5 #29 0xb7fe63c7 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5 #30 0xb7bdac31 in ~MainWindow (this=0x8d938e0) at /home/mark/kde/src/amarok/src/MainWindow.cpp:177 #31 0xb7bc5f42 in ~App (this=0xbf8a3000) at /home/mark/kde/src/amarok/src/App.cpp:241 #32 0x0804bded in main (argc=3, argv=0xbf8a34f4) at /home/mark/kde/src/amarok/src/main.cpp:129
Another one (with local changes), for reference: #0 0xb7f84430 in __kernel_vsyscall () #1 0xb67ed8a0 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb67ef268 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb6831e5d in ?? () from /lib/tls/i686/cmov/libc.so.6 #4 0xb6833a8d in ?? () from /lib/tls/i686/cmov/libc.so.6 #5 0xb6834a36 in ?? () from /lib/tls/i686/cmov/libc.so.6 #6 0xb6835865 in malloc () from /lib/tls/i686/cmov/libc.so.6 #7 0xb6a10dc7 in operator new () from /usr/lib/libstdc++.so.6 #8 0xb6a10f0d in operator new[] () from /usr/lib/libstdc++.so.6 #9 0xb6abbe43 in QHashData::rehash () from /usr/lib/libQtCore.so.4 #10 0xb7095ab2 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #11 0xb74264c5 in QRubberBand::~QRubberBand () from /usr/lib/libQtGui.so.4 #12 0xb6b990ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4 #13 0xb7095928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4 #14 0xb73e7921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4 #15 0xb7e85849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5 #16 0xb7ec83c7 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5 #17 0xb7abcbe4 in ~MainWindow (this=0x8fa3968) at /home/mark/kde/src/amarok/src/MainWindow.cpp:175 #18 0xb7aa7f42 in ~App (this=0xbfc85be0) at /home/mark/kde/src/amarok/src/App.cpp:241 #19 0x0804bded in main (argc=3, argv=0xbfc860d4) at /home/mark/kde/src/amarok/src/main.cpp:129
*** Bug 183575 has been marked as a duplicate of this bug. ***
*** Bug 183759 has been marked as a duplicate of this bug. ***
SVN commit 924157 by markey: Fix another potential crash on exit. Problem: Dereferencing dangling pointer MainWindow::s_instance in XSPFPlaylist::save(). Solution: QPointer and check for 0. CCBUG: 179400 M +1 -1 MainWindow.cpp M +3 -1 MainWindow.h M +7 -3 meta/XSPFPlaylist.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=924157
SVN commit 924572 by markey: debug++ Proves that the last major crash on exit (BR 179400) is caused by SideBar::deleteBrowsers(). amarok: BEGIN: virtual SideBarWidget::~SideBarWidget() KCrash: Application 'amarok' crashing... CCBUG: 179400 M +2 -0 Sidebar.h WebSVN link: http://websvn.kde.org/?view=rev&revision=924572
SVN commit 925634 by markey: Fix crashes on exit (finally!). This was a hard one, but I think I got it right now. Exited/restarted Amarok 5 times now without a crash. Please test. BUG: 179400 M +1 -1 App.cpp M +0 -1 MainWindow.cpp M +2 -2 MainWindow.h M +3 -1 Sidebar.h WebSVN link: http://websvn.kde.org/?view=rev&revision=925634
Patches from svn (921999, 924572, 925634) applied to amarok-2.0.1.1-1.fc10.x86_64.rpm. I must have closed amarok 30 times. Playlist saved and no crashes. Looks like you've nailed it!
Wow, thanks Clive. Good to hear! :)