Bug 185789 - Crash on exit with trunk
Summary: Crash on exit with trunk
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.0-SVN
Platform: unspecified Linux
: HI crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-28 12:05 UTC by Mark Kretschmann
Modified: 2009-03-05 08:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Kretschmann 2009-02-28 12:05:19 UTC
Version:           2.0-SVN (using 4.2.00 (KDE 4.2.0), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-12-generic

Crashing on exit, probably double-free.


Backtrace with latest trunk:


#0  0xb80d1430 in __kernel_vsyscall ()
#1  0xb692d8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb692f268 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb6971e5d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb6973a8d in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb6974a36 in ?? () from /lib/tls/i686/cmov/libc.so.6
#6  0xb6975865 in malloc () from /lib/tls/i686/cmov/libc.so.6
#7  0xb6b50dc7 in operator new () from /usr/lib/libstdc++.so.6
#8  0xb6b50f0d in operator new[] () from /usr/lib/libstdc++.so.6
#9  0xb6bfbe43 in QHashData::rehash () from /usr/lib/libQtCore.so.4
#10 0xb6cdaf7e in qt_removeObject () from /usr/lib/libQtCore.so.4
#11 0xb6ce1c4e in QObject::~QObject () from /usr/lib/libQtCore.so.4
#12 0xb71a91ea in QLayout::~QLayout () from /usr/lib/libQtGui.so.4
#13 0xb7189d73 in QBoxLayout::~QBoxLayout () from /usr/lib/libQtGui.so.4
#14 0xb7189df5 in QVBoxLayout::~QVBoxLayout () from /usr/lib/libQtGui.so.4
#15 0xb71d5899 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#16 0xb750c2e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4
#17 0xb7fb86b1 in KHBox::~KHBox () from /usr/lib/libkdeui.so.5
#18 0xb800ed91 in KVBox::~KVBox () from /usr/lib/libkdeui.so.5
#19 0xb7bd01f0 in ~PopupWidget (this=0x8c6f1d8) at /home/mark/kde/src/amarok/src/statusbar/PopupWidget.cpp:48
#20 0xb6cd90ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#21 0xb71d5928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#22 0xb7527921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4
#23 0xb7fd2849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5
#24 0xb80153c7 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5
#25 0xb7c07c6c in ~MainWindow (this=0x88cbc70) at /home/mark/kde/src/amarok/src/MainWindow.cpp:176
#26 0xb7bf1e7a in ~App (this=0xbf9d09b0) at /home/mark/kde/src/amarok/src/App.cpp:242
#27 0x0804bded in main (argc=3, argv=0xbf9d0ea4) at /home/mark/kde/src/amarok/src/main.cpp:129
Comment 1 Mark Kretschmann 2009-02-28 12:36:36 UTC
Another backtrace after some local changes (deleting StatusBar and its contents before MainWindow is dead):


#0  0xb7f51430 in __kernel_vsyscall ()
#1  0xb67ad8a0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb67af268 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb67f1e5d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb67f3a8d in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb67f4a36 in ?? () from /lib/tls/i686/cmov/libc.so.6
#6  0xb67f5865 in malloc () from /lib/tls/i686/cmov/libc.so.6
#7  0xb6a54f5d in qMalloc () from /usr/lib/libQtCore.so.4
#8  0xb6a5e043 in QByteArray::resize () from /usr/lib/libQtCore.so.4
#9  0xb6ae272a in QIODevicePrivate::QIODevicePrivate () from /usr/lib/libQtCore.so.4
#10 0xb6ad9fff in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6ada4c3 in QFile::QFile () from /usr/lib/libQtCore.so.4
#12 0xb6d1ac6b in ?? () from /usr/lib/libkdecore.so.5
#13 0xb6d1cd86 in ?? () from /usr/lib/libkdecore.so.5
#14 0xb6d04e0e in ?? () from /usr/lib/libkdecore.so.5
#15 0xb6d061ce in KConfig::reparseConfiguration () from /usr/lib/libkdecore.so.5
#16 0xb6d21a85 in KCoreConfigSkeleton::readConfig () from /usr/lib/libkdecore.so.5
#17 0xb6d25cb7 in KCoreConfigSkeleton::writeConfig () from /usr/lib/libkdecore.so.5
#18 0xb7b10d43 in ~SideBarWidget (this=0x8b33ea8) at /home/mark/kde/src/amarok/src/widgets/SidebarWidget.cpp:251
#19 0xb6b590ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#20 0xb7055928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#21 0xb738c2e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4
#22 0xb7e386b1 in KHBox::~KHBox () from /usr/lib/libkdeui.so.5
#23 0xb7a898be in ~SideBar (this=0x8b5fd40) at /home/mark/kde/src/amarok/src/Sidebar.h:81
#24 0xb6b590ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#25 0xb7055928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#26 0xb738c2e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4
#27 0xb73f3483 in QSplitter::~QSplitter () from /usr/lib/libQtGui.so.4
#28 0xb7b1b144 in ~Splitter (this=0x8c61640) at /home/mark/kde/src/amarok/src/widgets/Splitter.cpp:58
#29 0xb6b590ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#30 0xb7054fb8 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#31 0xb6b590ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#32 0xb7055928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#33 0xb73a7921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4
#34 0xb7e52849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5
#35 0xb7e953c7 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5
#36 0xb7a87ed8 in ~MainWindow (this=0x8533c70) at /home/mark/kde/src/amarok/src/MainWindow.cpp:177
#37 0xb7a720c6 in ~App (this=0xbfa50a30) at /home/mark/kde/src/amarok/src/App.cpp:242
#38 0x0804bded in main (argc=3, argv=0xbfa50f24) at /home/mark/kde/src/amarok/src/main.cpp:129
Comment 2 Mark Kretschmann 2009-02-28 12:46:53 UTC
Next backtrace. Now it's getting slightly obscure (I made sure to delete SideBar in the MainWidget dtor):


Thread 1 (Thread 0xb385c6e0 (LWP 32293)):
[KCrash Handler]
#6  0xb78e3e97 in Context::ToolbarView::resizeEvent (this=0xa58c4e8, event=0xbfa49e34) at /home/mark/kde/src/amarok/src/context/ToolbarView.cpp:103
#7  0xb704d77d in QWidget::event () from /usr/lib/libQtGui.so.4
#8  0xb7384fd3 in QFrame::event () from /usr/lib/libQtGui.so.4
#9  0xb741b7df in QAbstractScrollArea::viewportEvent () from /usr/lib/libQtGui.so.4
#10 0xb75a8f04 in QGraphicsView::viewportEvent () from /usr/lib/libQtGui.so.4
#11 0xb741dd85 in ?? () from /usr/lib/libQtGui.so.4
#12 0xb6b4304a in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib/libQtCore.so.4
#13 0xb6ff58ca in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#14 0xb6ffd7fa in QApplication::notify () from /usr/lib/libQtGui.so.4
#15 0xb7d67fed in KApplication::notify () from /usr/lib/libkdeui.so.5
#16 0xb6b43e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#17 0xb7086b6e in QWidgetPrivate::setGeometry_sys () from /usr/lib/libQtGui.so.4
#18 0xb7048528 in QWidget::setGeometry () from /usr/lib/libQtGui.so.4
#19 0xb741be2a in ?? () from /usr/lib/libQtGui.so.4
#20 0xb741c49e in QAbstractScrollArea::event () from /usr/lib/libQtGui.so.4
#21 0xb75a2734 in QGraphicsView::event () from /usr/lib/libQtGui.so.4
#22 0xb6ff58ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#23 0xb6ffd7fa in QApplication::notify () from /usr/lib/libQtGui.so.4
#24 0xb7d67fed in KApplication::notify () from /usr/lib/libkdeui.so.5
#25 0xb6b43e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#26 0xb7086b6e in QWidgetPrivate::setGeometry_sys () from /usr/lib/libQtGui.so.4
#27 0xb7048528 in QWidget::setGeometry () from /usr/lib/libQtGui.so.4
#28 0xb7028407 in QWidgetItem::setGeometry () from /usr/lib/libQtGui.so.4
#29 0xb7003ec6 in QBoxLayout::setGeometry () from /usr/lib/libQtGui.so.4
#30 0xb702322c in QLayoutPrivate::doResize () from /usr/lib/libQtGui.so.4
#31 0xb7023365 in QLayout::activate () from /usr/lib/libQtGui.so.4
#32 0xb7024912 in QLayout::widgetEvent () from /usr/lib/libQtGui.so.4
#33 0xb6ff58b7 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#34 0xb6ffd7fa in QApplication::notify () from /usr/lib/libQtGui.so.4
#35 0xb7d67fed in KApplication::notify () from /usr/lib/libkdeui.so.5
#36 0xb6b43e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#37 0xb7086b6e in QWidgetPrivate::setGeometry_sys () from /usr/lib/libQtGui.so.4
#38 0xb7048528 in QWidget::setGeometry () from /usr/lib/libQtGui.so.4
#39 0xb73ed478 in ?? () from /usr/lib/libQtGui.so.4
#40 0xb73eee8e in ?? () from /usr/lib/libQtGui.so.4
#41 0xb73f14e2 in ?? () from /usr/lib/libQtGui.so.4
#42 0xb6b53527 in QObject::event () from /usr/lib/libQtCore.so.4
#43 0xb704d004 in QWidget::event () from /usr/lib/libQtGui.so.4
#44 0xb73f1684 in QSplitter::event () from /usr/lib/libQtGui.so.4
#45 0xb6ff58ec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#46 0xb6ffd7fa in QApplication::notify () from /usr/lib/libQtGui.so.4
#47 0xb7d67fed in KApplication::notify () from /usr/lib/libkdeui.so.5
#48 0xb6b43e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#49 0xb700081e in QCoreApplication::sendEvent () from /usr/lib/libQtGui.so.4
#50 0xb6b5263c in QObjectPrivate::setParent_helper () from /usr/lib/libQtCore.so.4
#51 0xb6b5acc8 in QObject::~QObject () from /usr/lib/libQtCore.so.4
#52 0xb704eb0f in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#53 0xb73852e1 in QFrame::~QFrame () from /usr/lib/libQtGui.so.4
#54 0xb7e316b1 in KHBox::~KHBox () from /usr/lib/libkdeui.so.5
#55 0xb7a82db5 in ~SideBar (this=0xa445030) at /home/mark/kde/src/amarok/src/Sidebar.h:86
#56 0xb7a80dac in ~MainWindow (this=0x9dc5c60) at /home/mark/kde/src/amarok/src/MainWindow.cpp:177
#57 0xb7a6b0c6 in ~App (this=0xbfa4ba50) at /home/mark/kde/src/amarok/src/App.cpp:242
#58 0x0804bded in main (argc=4, argv=0xbfa4bf44) at /home/mark/kde/src/amarok/src/main.cpp:129
Comment 3 Mark Kretschmann 2009-02-28 19:46:49 UTC
SVN commit 933358 by markey:

Make sure to delete the StatusBar and all the stuff in it before
MainWindow is destroyed.

CCBUG: 185789

 M  +1 -0      MainWindow.cpp  
 M  +3 -0      statusbar/CompoundProgressBar.cpp  
 M  +5 -0      statusbar/StatusBar.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933358
Comment 4 Mark Kretschmann 2009-02-28 19:46:52 UTC
SVN commit 933359 by markey:

Remove the private d-pointer class from SvgHandler, and turn it into
normal members.

NB: I'm not claiming that this class was implement wrong, but I got one
suspicious BT, and then we discussed a little on IRC and pretty much
decided: stability > compile times.

CCBUG: 185789

 M  +1 -0      MainWindow.cpp  
 M  +51 -64    SvgHandler.cpp  
 M  +17 -8     SvgHandler.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933359
Comment 5 Mark Kretschmann 2009-02-28 19:46:57 UTC
SVN commit 933360 by markey:

Delete the PaletteHandler object inside of the MainWindow dtor too. I
have a feeling that stuff that gets destroyed afterwards is giving us crashy
headaches.

CCBUG: 185789

 M  +1 -0      MainWindow.cpp  
 M  +3 -1      PaletteHandler.cpp  
 M  +2 -2      PaletteHandler.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933360
Comment 6 Mark Kretschmann 2009-02-28 19:47:00 UTC
SVN commit 933361 by markey:

Make sure to delete MainToolBar and SideBar from within
MainWidget dtor too. It can't be right that they get destroyed
afterwards.

CCBUG: 185789

 M  +2 -0      MainWindow.cpp  
 M  +4 -1      Sidebar.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933361
Comment 7 Greyor 2009-03-01 02:04:16 UTC
Amarok 2.0.1.1, on Ubuntu 8.10 Intrepid Ibex AMD64. Version from the Amarok PPA.

I've also suffered from this problem, and as far as I can tell, any changes that are made to the playlist -- even if they are saved with "Save Playlist" -- are rolled back. Case in point, I added an album to the playlist, saved it, and then Amarok crashed on exit per the usual, and the album was no longer there when I restarted.

Here's a backtrace log provided upon crash:

Application: Amarok (amarok), signal SIGABRT
0x00007f3ac330a6e1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 19590)]

Thread 15 (Thread 0x409e8950 (LWP 19594)):
#0  0x00007f3ac276655d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ab4c66f31 in metronom_sync_loop (this=0xd158d0) at metronom.c:870
#2  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#3  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 14 (Thread 0x412ce950 (LWP 19595)):
#0  0x00007f3ac333f236 in poll () from /lib/libc.so.6
#1  0x00007f3ac29b43a8 in g_main_context_iterate (context=0xd172a0, block=1, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:3091
#2  0x00007f3ac29b46cb in IA__g_main_context_iteration (context=0xd172a0, may_block=1) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2841
#3  0x00007f3ac531917e in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#4  0x00007f3ac52ef682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#5  0x00007f3ac52ef80d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#6  0x00007f3ac52053f8 in QThread::exec () from /usr/lib/libQtCore.so.4
#7  0x00007f3ab4ec2a74 in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#8  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#10 0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x41acf950 (LWP 19598)):
#0  0x00007f3ac3356b5e in __lll_lock_wait_private () from /lib/libc.so.6
#1  0x00007f3ac32e1c45 in _L_lock_4800 () from /lib/libc.so.6
#2  0x00007f3ac32de09b in free () from /lib/libc.so.6
#3  0x00007f3aaf67e71d in ?? () from /usr/lib/libpulse.so.0
#4  0x00007f3aaf6a4c08 in ?? () from /usr/lib/libpulse.so.0
#5  0x00007f3aaf687522 in pa_mainloop_dispatch () from /usr/lib/libpulse.so.0
#6  0x00007f3aaf6878f6 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#7  0x00007f3aaf6879b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#8  0x00007f3aaf691d6d in ?? () from /usr/lib/libpulse.so.0
#9  0x00007f3aaf6ae400 in ?? () from /usr/lib/libpulse.so.0
#10 0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#11 0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 12 (Thread 0x422d0950 (LWP 19599)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ab4c780d3 in ao_loop (this_gen=<value optimized out>) at audio_out.c:346
#2  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#3  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x42ad1950 (LWP 19689)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3abd1495e4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x4649a10, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f3abd14bd93 in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#5  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#9  0x00007f3abd14a30f in ThreadWeaver::ThreadRunHelper::run (this=0x42ad1080, parent=0x4649a10, th=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:87
#10 0x00007f3abd14a769 in ThreadWeaver::Thread::run (this=0x4ed8ae0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:142
#11 0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#12 0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#13 0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x432d2950 (LWP 19690)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3abd1495e4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x4649a10, th=0x114f800) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f3abd14bd93 in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x114f800) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f3abd14a30f in ThreadWeaver::ThreadRunHelper::run (this=0x432d2080, parent=0x4649a10, th=0x114f800) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:87
#5  0x00007f3abd14a769 in ThreadWeaver::Thread::run (this=0x114f800) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:142
#6  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#7  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#8  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x43ad3950 (LWP 19696)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3abd1495e4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x4649a10, th=0x40592f0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f3abd14bd93 in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x40592f0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x40592f0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#5  0x00007f3abd14a30f in ThreadWeaver::ThreadRunHelper::run (this=0x43ad3080, parent=0x4649a10, th=0x40592f0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:87
#6  0x00007f3abd14a769 in ThreadWeaver::Thread::run (this=0x40592f0) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:142
#7  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#9  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x442d4950 (LWP 19697)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3abd1495e4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x4649a10, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f3abd14bd93 in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#5  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f3abd14bdac in ThreadWeaver::WorkingHardState::applyForWork (this=0x63c43a0, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f3abd14a30f in ThreadWeaver::ThreadRunHelper::run (this=0x442d4080, parent=0x4649a10, th=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:87
#8  0x00007f3abd14a769 in ThreadWeaver::Thread::run (this=0x4eecd80) at /build/buildd/kde4libs-4.2.0/threadweaver/Weaver/Thread.cpp:142
#9  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#11 0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x44ad5950 (LWP 20720)):
#0  0x00007f3ac33414b2 in select () from /lib/libc.so.6
#1  0x00007f3ab4c8f9c4 in xine_usec_sleep (usec=<value optimized out>) at utils.c:482
#2  0x00007f3ab4c74c1b in video_out_loop (this_gen=<value optimized out>) at video_out.c:1246
#3  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#4  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x452d6950 (LWP 20721)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ab4c6a99b in fifo_buffer_get (fifo=0x12fbce0) at buffer.c:230
#2  0x00007f3ab4c708be in video_decoder_loop (stream_gen=<value optimized out>) at video_decoder.c:130
#3  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#4  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x45ad7950 (LWP 20722)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ab4c6a99b in fifo_buffer_get (fifo=0x7f3aa801b170) at buffer.c:230
#2  0x00007f3ab4c7196e in audio_decoder_loop (stream_gen=<value optimized out>) at audio_decoder.c:66
#3  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#4  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x462d8950 (LWP 20723)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ab4c7ad1b in listener_loop (queue_gen=<value optimized out>) at events.c:56
#2  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#3  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x47adb950 (LWP 20746)):
#0  0x00007f3ac27662d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209349 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3ac1b1d29c in ?? () from /usr/lib/libQtNetwork.so.4
#3  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#5  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x46ad9950 (LWP 25053)):
#0  0x00007f3ac276655d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3ac5209327 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3ac51ff509 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f3ac5208362 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f3ac27623ea in start_thread () from /lib/libpthread.so.0
#5  0x00007f3ac3348cbd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3ac56b0730 (LWP 19590)):
[KCrash Handler]
#5  0x00007f3ac3295015 in raise () from /lib/libc.so.6
#6  0x00007f3ac3296b83 in abort () from /lib/libc.so.6
#7  0x00007f3ac32d60c8 in __libc_message () from /lib/libc.so.6
#8  0x00007f3ac32dba58 in malloc_printerr () from /lib/libc.so.6
#9  0x00007f3ac32dde5e in _int_free () from /lib/libc.so.6
#10 0x00007f3ac32de0a6 in free () from /lib/libc.so.6
#11 0x00007f3ac4546819 in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007f3ac4475c58 in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f3ac4476680 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007f3ac446bfa3 in QPixmap::deref () from /usr/lib/libQtGui.so.4
#15 0x00007f3ac446e4c4 in QPixmap::~QPixmap () from /usr/lib/libQtGui.so.4
#16 0x00007f3ac43f6e58 in QWidgetPrivate::deleteExtra () from /usr/lib/libQtGui.so.4
#17 0x00007f3ac43f707d in QWidgetPrivate::~QWidgetPrivate () from /usr/lib/libQtGui.so.4
#18 0x00007f3ac5307520 in QObject::~QObject () from /usr/lib/libQtCore.so.4
#19 0x00007f3ac4403a6f in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#20 0x00007f3ac4933d0d in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f3ac4932ee4 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007f3ac491fd58 in QSystemTrayIcon::~QSystemTrayIcon () from /usr/lib/libQtGui.so.4
#23 0x00007f3ac3906626 in ~TrayIcon (this=0x699f230) at /build/buildd/amarok-kde4-2.0.1.1/src/Systray.h:36
#24 0x00007f3ac52fe601 in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#25 0x00007f3ac44038cd in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#26 0x00007f3ac3ec7f99 in ~KMainWindow (this=0xb9b950) at /build/buildd/kde4libs-4.2.0/kdeui/widgets/kmainwindow.cpp:466
#27 0x00007f3ac387159e in ~MainWindow (this=0xb9b950) at /build/buildd/amarok-kde4-2.0.1.1/src/MainWindow.cpp:172
#28 0x00007f3ac385de5a in ~App (this=0x7fffcd7f7fc0) at /build/buildd/amarok-kde4-2.0.1.1/src/App.cpp:240
#29 0x0000000000404102 in main (argc=1, argv=0x7fffcd7f91d8) at /build/buildd/amarok-kde4-2.0.1.1/src/main.cpp:130
Comment 8 Mark Kretschmann 2009-03-01 07:48:00 UTC
@Greyor: Ok, thanks for the heads up, but your report is probably unrelated to what this is about (Amarok 2.0.1.1 vs 2.1 (SVN trunk), and is already fixed in SVN.

Besides, your backtrace is invalid (missing debugging symbols for Amarok).

Thanks anyway :)
Comment 9 Greyor 2009-03-01 08:18:03 UTC
@Mark: Apologies, I had thought this was for 2.0.1.1. And I did install the amarok-kde4-dbg package, so I thought they would have shown up. Oh well.

Looking forward to 2.1 :)
Comment 10 Mark Kretschmann 2009-03-01 11:27:14 UTC
Another funny backtrace:


#0  0xb8006430 in __kernel_vsyscall ()
#1  0xb68628a0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb6864268 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb68a6e5d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb68a8a8d in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb68a9a36 in ?? () from /lib/tls/i686/cmov/libc.so.6
#6  0xb68aa865 in malloc () from /lib/tls/i686/cmov/libc.so.6
#7  0xb6b09f5d in qMalloc () from /usr/lib/libQtCore.so.4
#8  0xb6b13043 in QByteArray::resize () from /usr/lib/libQtCore.so.4
#9  0xb6b9772a in QIODevicePrivate::QIODevicePrivate () from /usr/lib/libQtCore.so.4
#10 0xb6b8efff in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6b8f4c3 in QFile::QFile () from /usr/lib/libQtCore.so.4
#12 0xb7a84a93 in Meta::XSPFPlaylist::save (this=0x94d8160, location=@0xbf805738, relative=true) at /home/mark/kde/src/amarok/src/meta/XSPFPlaylist.cpp:117
#13 0xb7adda48 in PlaylistManager::exportPlaylist (this=0x9480528, tracks=
        {{p = {static shared_null = {ref = {_q_value = 22049}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0xbf805734}, d = 0xbf805734}},
    location=@0xbf805738) at /home/mark/kde/src/amarok/src/playlistmanager/PlaylistManager.cpp:333
#14 0xb79f294a in ~Model (this=0x9321b10) at /home/mark/kde/src/amarok/src/playlist/PlaylistModel.cpp:146
#15 0xb79eb5b2 in Playlist::Model::destroy () at /home/mark/kde/src/amarok/src/playlist/PlaylistModel.cpp:67
#16 0xb7b274c0 in ~App (this=0xbf8057e0) at /home/mark/kde/src/amarok/src/App.cpp:245
#17 0x0804bded in main (argc=3, argv=0xbf805cd4) at /home/mark/kde/src/amarok/src/main.cpp:129
Comment 11 Mark Kretschmann 2009-03-01 12:04:57 UTC
SVN commit 933555 by markey:

Now we crash only about 50% of the time on exit. Hey, I call this
progress, in a Heisenberg way!

CCBUG: 185789

 M  +4 -3      MainWindow.cpp  
 M  +3 -1      widgets/Splitter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933555
Comment 12 Mark Kretschmann 2009-03-01 12:05:05 UTC
SVN commit 933557 by markey:

Fix some more breakage on exit. I now got it down to crashing "rarely"
here.

One thing that often liked to crash was "QFile file( location )" in
XSPFPlaylist::save(). I dunno why it did that, but calling
"QFile::remove()" before it seems to fix it. You can see a funny little
backtrace from it in the bug report.

CCBUG: 185789

 M  +2 -2      App.cpp  
 M  +4 -3      MainWindow.cpp  
 M  +1 -0      meta/XSPFPlaylist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=933557
Comment 13 Mark Kretschmann 2009-03-02 10:46:52 UTC
SVN commit 934043 by markey:

Move KAboutData object from App.cpp to main.cpp.

Why did I do this? Because I noticed that pretty much every other KDE app is
donig it like this, and then we have this wtf-backtrace mentioning
KAboutData:

16 0xb6eadd64 in KLocalizedString::toString () from /usr/lib/libkdecore.so.5
17 0xb6e07e91 in KAboutData::programName () from /usr/lib/libkdecore.so.5
18 0xb7e47e54 in ?? () from /usr/lib/libkdeui.so.5
19 0xb7e48573 in ?? () from /usr/lib/libkdeui.so.5
20 0xb7e48682 in ?? () from /usr/lib/libkdeui.so.5
21 0xb7d1968a in KAction::~KAction () from /usr/lib/libkdeui.so.5
22 0xb6bea0ff in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
23 0xb70e6928 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
24 0xb7438921 in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4
25 0xb7ee0849 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5

CCBUG: 185789

 M  +1 -3      ActionClasses.cpp  
 M  +5 -8      App.cpp  
 M  +9 -2      main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=934043
Comment 14 Mark Kretschmann 2009-03-02 12:44:32 UTC
Update: I just talked to David Faure. This is actually a bug in KDE 4.2.0, and will be fixed in 4.2.1 (already tagged).

The fixing commit: http://websvn.kde.org/?view=rev&revision=918169


Keeping this report open until we have final confirmation.
Comment 15 Mark Kretschmann 2009-03-04 09:33:04 UTC
SVN commit 934918 by markey:

Revert "Move KAboutData object from App.cpp to main.cpp."
(SVN commit 934043).

The original commit was made in the process of chasing the crash-on-exit bug. It
turned out unnecessary, and also introduced a problem with giving CLI
arguments to Amarok, so I'm reverting it.

CCBUG: 185789

 M  +3 -1      ActionClasses.cpp  
 M  +8 -5      App.cpp  
 M  +2 -9      main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=934918
Comment 16 Mark Kretschmann 2009-03-05 08:55:09 UTC
Good news, everyone!

I just got KDE 4.2.1 via Kubuntu update, and I can confirm that it fixes the crash problem :)