Bug 184630 - Crash when resuming from suspend
Summary: Crash when resuming from suspend
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.0-SVN
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 184665 185005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-17 13:28 UTC by Kevin Funk
Modified: 2009-02-27 17:29 UTC (History)
2 users (show)

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 Kevin Funk 2009-02-17 13:28:35 UTC
Version:           2.0-SVN (using 4.2.61 (KDE 4.2.61 (KDE 4.3 >= 20090127)), compiled sources)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27-11-generic

How to reproduce:
- Start amarok
- Suspend
- Resume
- Play some track
<Crash>

Reproducible: Every time

Backtrace:
Thread 1 (Thread 0xb37f46e0 (LWP 25188)):
[KCrash Handler]
#6  0xb71655f9 in ?? () from /usr/lib/libQtGui.so.4
#7  0xb7152f65 in QWidget::removeAction () from /usr/lib/libQtGui.so.4
#8  0xb7c00b80 in Amarok::TrayIcon::setupMenu (this=0x9de3020) at /home/krf/kde-devel/src/amarok/src/Systray.cpp:402
#9  0xb7b8dfe8 in EngineSubject::newTrackPlaying (this=0x94f46a0) at /home/krf/kde-devel/src/amarok/src/EngineObserver.cpp:155
#10 0xb7b89c5a in EngineController::slotNewTrackPlaying (this=0x94f4698, source=@0x95c88c8) at /home/krf/kde-devel/src/amarok/src/EngineController.cpp:673
#11 0xb7b8c72f in EngineController::qt_metacall (this=0x94f4698, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbf8ff72c) at /home/krf/kde-devel/build/amarok/src/EngineController.moc:153
#12 0xb6c95a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb6c967e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0xb5ed64c3 in Phonon::MediaObject::currentSourceChanged (this=0x95f8d60, _t1=@0x95c88c8) at /home/krf/kde-devel/build/kdesupport/phonon/phonon/moc_mediaobject.cpp:226
#15 0xb5ed8059 in Phonon::MediaObjectPrivate::_k_currentSourceChanged (this=0x95f9350, source=@0x95c88c8) at /home/krf/kde-devel/src/kdesupport/phonon/phonon/mediaobject.cpp:446
#16 0xb5ed8f9c in Phonon::MediaObject::qt_metacall (this=0x95f8d60, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0xbf8ff89c)
    at /home/krf/kde-devel/build/kdesupport/phonon/phonon/moc_mediaobject.cpp:137
#17 0xb6c95a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb6c967e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0xb1cadf93 in Phonon::Xine::MediaObject::currentSourceChanged (this=0x95c8898, _t1=@0x95c88c8) at /home/krf/kde-devel/build/kdesupport/phonon/xine/mediaobject.moc:207
#20 0xb1cafc2a in Phonon::Xine::MediaObject::setSourceInternal (this=0x95c8898, source=@0x95f9398, how=Phonon::Xine::MediaObject::HardSwitch)
    at /home/krf/kde-devel/src/kdesupport/phonon/xine/mediaobject.cpp:405
#21 0xb1cb01d0 in Phonon::Xine::MediaObject::setSource (this=0x95c8898, source=@0x95f9398) at /home/krf/kde-devel/src/kdesupport/phonon/xine/mediaobject.cpp:317
#22 0xb5ed8598 in Phonon::MediaObject::setCurrentSource (this=0x95f8d60, newSource=@0xbf8ffa10) at /home/krf/kde-devel/src/kdesupport/phonon/phonon/mediaobject.cpp:260
#23 0xb7b8a788 in EngineController::playUrl (this=0x94f4698, url=@0xbf8ffa64, offset=0) at /home/krf/kde-devel/src/amarok/src/EngineController.cpp:299
#24 0xb7b8ae30 in EngineController::play (this=0x94f4698, track=@0xbf8ffabc, offset=0) at /home/krf/kde-devel/src/amarok/src/EngineController.cpp:287
#25 0xb7a4d0a9 in Playlist::Actions::play (this=0x9db8a70, trackid=1187453648949711739, now=true) at /home/krf/kde-devel/src/amarok/src/playlist/PlaylistActions.cpp:177
#26 0xb7a4d1ce in Playlist::Actions::play (this=0x9db8a70, index=@0xa3d8bd8) at /home/krf/kde-devel/src/amarok/src/playlist/PlaylistActions.cpp:145
#27 0xb7a7f5dd in Playlist::PrettyListView::trackActivated (this=0x9f146f0, idx=@0xa3d8bd8) at /home/krf/kde-devel/src/amarok/src/playlist/view/listview/PrettyListView.cpp:162
#28 0xb7a8016a in Playlist::PrettyListView::qt_metacall (this=0x9f146f0, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0xbf8ffc2c) at /home/krf/kde-devel/build/amarok/src/PrettyListView.moc:113
#29 0xb6c95a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#30 0xb6c967e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#31 0xb75ca5d3 in QAbstractItemView::doubleClicked () from /usr/lib/libQtGui.so.4
#32 0xb75cc3a1 in QAbstractItemView::mouseDoubleClickEvent () from /usr/lib/libQtGui.so.4
#33 0xb71607f2 in QWidget::event () from /usr/lib/libQtGui.so.4
#34 0xb7497f53 in QFrame::event () from /usr/lib/libQtGui.so.4
#35 0xb752e75f in QAbstractScrollArea::viewportEvent () from /usr/lib/libQtGui.so.4
#36 0xb75d9c4f in QAbstractItemView::viewportEvent () from /usr/lib/libQtGui.so.4
#37 0xb7530d05 in ?? () from /usr/lib/libQtGui.so.4
#38 0xb6c8004a in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib/libQtCore.so.4
#39 0xb71088ca in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#40 0xb7111121 in QApplication::notify () from /usr/lib/libQtGui.so.4
#41 0xb7e57a91 in KApplication::notify (this=0xbf900d10, receiver=0x9f2bc70, event=0xbf900468) at /home/krf/kde-devel/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#42 0xb6c80e61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#43 0xb71103ae in QApplicationPrivate::sendMouseEvent () from /usr/lib/libQtGui.so.4
#44 0xb717a696 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb7179a25 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#46 0xb71a37ea in ?? () from /usr/lib/libQtGui.so.4
#47 0xb4cef6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0xb4cf2da3 in ?? () from /usr/lib/libglib-2.0.so.0
#49 0xb4cf2f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#50 0xb6cab478 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#51 0xb71a2ee5 in ?? () from /usr/lib/libQtGui.so.4
#52 0xb6c7f52a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#53 0xb6c7f6ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#54 0xb6c81da5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#55 0xb7108767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#56 0x0804b547 in main (argc=2, argv=0xbf901204) at /home/krf/kde-devel/src/amarok/src/main.cpp:129
Comment 1 Mark Kretschmann 2009-02-17 16:39:16 UTC
*** Bug 184665 has been marked as a duplicate of this bug. ***
Comment 2 Mark Kretschmann 2009-02-17 17:16:18 UTC
SVN commit 927478 by markey:

Attempt to fix dubious crash when computer is resumed from suspend mode.

Does this commit fix it? If not, it could be an evil dangling pointer to
a QAction at work...

CCBUG: 184630

 M  +4 -2      Systray.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927478
Comment 3 Mark Kretschmann 2009-02-17 18:32:42 UTC
SVN commit 927494 by markey:

Proper fix for the problem with dangling pointers to
GlobalCurrentTrackActions (I hope).

We now try to filter out dangling pointers to QActions (where do they
come from anyway?) before returning them.

BUG: 184630

 M  +16 -1     GlobalCurrentTrackActions.cpp  
 M  +3 -2      GlobalCurrentTrackActions.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927494
Comment 4 Dan Meltzer 2009-02-18 20:30:51 UTC
Seems to have the same problem in MainToolBar.

Thread 1 (Thread 0xb2f91730 (LWP 24154)):
[KCrash Handler]
#6  0xb7033b39 in ?? () from /usr/lib/libQtGui.so.4
#7  0xb701e2b5 in QWidget::removeAction(QAction*) () from /usr/lib/libQtGui.so.4
#8  0xb7ba5e60 in MainToolbar::handleAddActions (this=0x89f0618) at /home/hydrogen/kde/src/amarok/src/widgets/MainToolbar.cpp:129
#9  0xb7ba61fd in MainToolbar::engineStateChanged (this=0x89f0618, state=Phonon::PlayingState, oldState=Phonon::BufferingState) at /home/hydrogen/kde/src/amarok/src/widgets/MainToolbar.cpp:117
#10 0xb7b22888 in EngineSubject::stateChangedNotify (this=0x81603b8, newState=Phonon::PlayingState, oldState=Phonon::BufferingState) at /home/hydrogen/kde/src/amarok/src/EngineObserver.cpp:106
#11 0xb7b204f3 in EngineController::slotStateChanged (this=0x81603b0, newState=Phonon::PlayingState, oldState=Phonon::BufferingState) at /home/hydrogen/kde/src/amarok/src/EngineController.cpp:704
#12 0xb7b2094b in EngineController::qt_metacall (this=0x81603b0, _c=QMetaObject::InvokeMetaMethod, _id=28, _a=0xbff4a768) at /home/hydrogen/kde/build/amarok/src/EngineController.moc:155
#13 0xb6b17cb8 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#14 0xb6b19432 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#15 0xb5d7d009 in Phonon::MediaObject::stateChanged (this=0x81606c0, _t1=Phonon::PlayingState, _t2=Phonon::BufferingState) at /usr/src/debug/phonon-4.3.0/build/phonon/moc_mediaobject.cpp:179
#16 0xb5d7e820 in Phonon::MediaObjectPrivate::_k_stateChanged (this=0x8160728, newstate=Phonon::PlayingState, oldstate=Phonon::BufferingState)
    at /usr/src/debug/phonon-4.3.0/phonon/mediaobject.cpp:414
#17 0xb5d7ebbb in Phonon::MediaObject::qt_metacall (this=0x81606c0, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0xbff4a8b8) at /usr/src/debug/phonon-4.3.0/build/phonon/moc_mediaobject.cpp:135
#18 0xb6b17cb8 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#19 0xb6b19432 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#20 0xb182bef9 in Phonon::Xine::MediaObject::stateChanged (this=0x8161468, _t1=Phonon::PlayingState, _t2=Phonon::BufferingState) at /usr/src/debug/phonon-4.3.0/build/xine/mediaobject.moc:214
#21 0xb182e41f in Phonon::Xine::MediaObject::qt_metacall (this=0x8161468, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0xa3c0d30) at /usr/src/debug/phonon-4.3.0/build/xine/mediaobject.moc:157
#22 0xb6b1090b in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#23 0xb6b123a0 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#24 0xb6fd329c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb6fdb55e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0xb7e1f92d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0xb6b01abb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#28 0xb6b02655 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#29 0xb6b0284d in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#30 0xb7072e6f in ?? () from /usr/lib/libQtGui.so.4
#31 0xb6b000da in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0xb6b0051a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0xb6b02919 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#34 0xb6fd3117 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#35 0x0804be45 in main (argc=1, argv=0xbff4b564) at /home/hydrogen/kde/src/amarok/src/main.cpp:129
Comment 5 Eelko Berkenpies 2009-02-19 10:29:59 UTC
I am still able to reproduce it the way I've described in my earlier bug report. Although I think the problem/solution is already known because my crash report looks similar (the same even?) to Dan Meltzer's one.

Not sure if you guys need it but here's my crash report anway, this time attached inline ( thanks for the advice, markey :) ).

Application: Amarok (amarok), signal SIGSEGV
[Current thread is 1 (Thread 0xb7f839c0 (LWP 6836))]

Thread 23 (Thread 0xb6789b90 (LWP 6837)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3432 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011b3c51 in ?? () from /usr/lib/libxine.so.1
#3  0x003af51f in start_thread () from /lib/libpthread.so.0
#4  0x002e504e in clone () from /lib/libc.so.6

Thread 22 (Thread 0xb5d88b90 (LWP 6838)):
#0  0x0044f54a in clock_gettime () from /lib/librt.so.1
#1  0x0783a42b in ?? () from /usr/lib/libQtCore.so.4
#2  0x0783a601 in ?? () from /usr/lib/libQtCore.so.4
#3  0x0783c13c in ?? () from /usr/lib/libQtCore.so.4
#4  0x078389da in ?? () from /usr/lib/libQtCore.so.4
#5  0x008c9142 in g_main_context_prepare () from /lib/libglib-2.0.so.0
#6  0x008c95ca in ?? () from /lib/libglib-2.0.so.0
#7  0x008c9aa1 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#8  0x07838817 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#9  0x0780c88a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#10 0x0780ca4a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#11 0x0771a4d9 in QThread::exec () from /usr/lib/libQtCore.so.4
#12 0x01154802 in Phonon::MediaSource::type () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#13 0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#14 0x003af51f in start_thread () from /lib/libpthread.so.0
#15 0x002e504e in clone () from /lib/libc.so.6

Thread 21 (Thread 0xb1386b90 (LWP 6844)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011c6064 in ?? () from /usr/lib/libxine.so.1
#3  0x003af51f in start_thread () from /lib/libpthread.so.0
#4  0x002e504e in clone () from /lib/libc.so.6

Thread 20 (Thread 0xb0985b90 (LWP 6845)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011c6064 in ?? () from /usr/lib/libxine.so.1
#3  0x003af51f in start_thread () from /lib/libpthread.so.0
#4  0x002e504e in clone () from /lib/libc.so.6

Thread 19 (Thread 0xaff42b90 (LWP 6847)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4df128e in os_event_wait_low () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4dedf71 in os_aio_simulated_handle () from /usr/lib/mysql/libmysqld.so.0
#4  0xb4c778ad in fil_aio_wait () from /usr/lib/mysql/libmysqld.so.0
#5  0xb4f2b23e in ?? () from /usr/lib/mysql/libmysqld.so.0
#6  0x003af51f in start_thread () from /lib/libpthread.so.0
#7  0x002e504e in clone () from /lib/libc.so.6

Thread 18 (Thread 0xb3f2ab90 (LWP 6848)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4df128e in os_event_wait_low () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4dedf71 in os_aio_simulated_handle () from /usr/lib/mysql/libmysqld.so.0
#4  0xb4c778ad in fil_aio_wait () from /usr/lib/mysql/libmysqld.so.0
#5  0xb4f2b23e in ?? () from /usr/lib/mysql/libmysqld.so.0
#6  0x003af51f in start_thread () from /lib/libpthread.so.0
#7  0x002e504e in clone () from /lib/libc.so.6

Thread 17 (Thread 0xb3529b90 (LWP 6849)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4df128e in os_event_wait_low () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4dedf71 in os_aio_simulated_handle () from /usr/lib/mysql/libmysqld.so.0
#4  0xb4c778ad in fil_aio_wait () from /usr/lib/mysql/libmysqld.so.0
#5  0xb4f2b23e in ?? () from /usr/lib/mysql/libmysqld.so.0
#6  0x003af51f in start_thread () from /lib/libpthread.so.0
#7  0x002e504e in clone () from /lib/libc.so.6

Thread 16 (Thread 0xb2b28b90 (LWP 6850)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4df128e in os_event_wait_low () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4dedf71 in os_aio_simulated_handle () from /usr/lib/mysql/libmysqld.so.0
#4  0xb4c778ad in fil_aio_wait () from /usr/lib/mysql/libmysqld.so.0
#5  0xb4f2b23e in ?? () from /usr/lib/mysql/libmysqld.so.0
#6  0x003af51f in start_thread () from /lib/libpthread.so.0
#7  0x002e504e in clone () from /lib/libc.so.6

Thread 15 (Thread 0xaeb40b90 (LWP 6852)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x002dd3d1 in select () from /lib/libc.so.6
#2  0xb4df175a in os_thread_sleep () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4f27790 in srv_lock_timeout_and_monitor_thread () from /usr/lib/mysql/libmysqld.so.0
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 14 (Thread 0xae13fb90 (LWP 6853)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x002dd3d1 in select () from /lib/libc.so.6
#2  0xb4df175a in os_thread_sleep () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4f265d9 in srv_error_monitor_thread () from /usr/lib/mysql/libmysqld.so.0
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 13 (Thread 0xad73eb90 (LWP 6854)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4df128e in os_event_wait_low () from /usr/lib/mysql/libmysqld.so.0
#3  0xb4f257e9 in srv_master_thread () from /usr/lib/mysql/libmysqld.so.0
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 12 (Thread 0xabb3cb90 (LWP 6855)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x002dd3d1 in select () from /lib/libc.so.6
#2  0x011df27a in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0x011c2535 in ?? () from /usr/lib/libxine.so.1
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 11 (Thread 0xaad52b90 (LWP 6856)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011b79b8 in ?? () from /usr/lib/libxine.so.1
#3  0x011bddf1 in ?? () from /usr/lib/libxine.so.1
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 10 (Thread 0xaa184b90 (LWP 6857)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011b79b8 in ?? () from /usr/lib/libxine.so.1
#3  0x011befdd in ?? () from /usr/lib/libxine.so.1
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 9 (Thread 0xa9783b90 (LWP 6858)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x011c91a8 in ?? () from /usr/lib/libxine.so.1
#3  0x003af51f in start_thread () from /lib/libpthread.so.0
#4  0x002e504e in clone () from /lib/libc.so.6

Thread 8 (Thread 0xa8d10b90 (LWP 6859)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x002dd3d1 in select () from /lib/libc.so.6
#2  0x077ed627 in ?? () from /usr/lib/libQtCore.so.4
#3  0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#4  0x003af51f in start_thread () from /lib/libpthread.so.0
#5  0x002e504e in clone () from /lib/libc.so.6

Thread 7 (Thread 0xa830fb90 (LWP 6861)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e7a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x003dce58 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x003dfbfc in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x003dba3b in ?? () from /usr/lib/libthreadweaver.so.4
#6  0x003dfcfa in ?? () from /usr/lib/libthreadweaver.so.4
#7  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#8  0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#9  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#10 0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#11 0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#12 0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#13 0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#14 0x003ddcce in ?? () from /usr/lib/libthreadweaver.so.4
#15 0x003de30b in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4
#16 0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#17 0x003af51f in start_thread () from /lib/libpthread.so.0
#18 0x002e504e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xa6f0db90 (LWP 6863)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e7a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x003dce58 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x003dfbfc in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x003dba3b in ?? () from /usr/lib/libthreadweaver.so.4
#6  0x003dfcfa in ?? () from /usr/lib/libthreadweaver.so.4
#7  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#8  0x003ddcce in ?? () from /usr/lib/libthreadweaver.so.4
#9  0x003de30b in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4
#10 0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#11 0x003af51f in start_thread () from /lib/libpthread.so.0
#12 0x002e504e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xa650cb90 (LWP 6870)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e7a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x003dce58 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x003dfbfc in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x003dba3b in ?? () from /usr/lib/libthreadweaver.so.4
#6  0x003dfcfa in ?? () from /usr/lib/libthreadweaver.so.4
#7  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#8  0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#9  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#10 0x003ddcce in ?? () from /usr/lib/libthreadweaver.so.4
#11 0x003de30b in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4
#12 0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#13 0x003af51f in start_thread () from /lib/libpthread.so.0
#14 0x002e504e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xa5b0bb90 (LWP 6871)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e7a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x003dce58 in ?? () from /usr/lib/libthreadweaver.so.4
#4  0x003dfbfc in ?? () from /usr/lib/libthreadweaver.so.4
#5  0x003dba3b in ?? () from /usr/lib/libthreadweaver.so.4
#6  0x003dfcfa in ?? () from /usr/lib/libthreadweaver.so.4
#7  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#8  0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#9  0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#10 0x003dfd19 in ?? () from /usr/lib/libthreadweaver.so.4
#11 0x003dd3e3 in ?? () from /usr/lib/libthreadweaver.so.4
#12 0x003ddcce in ?? () from /usr/lib/libthreadweaver.so.4
#13 0x003de30b in ThreadWeaver::Thread::run () from /usr/lib/libthreadweaver.so.4
#14 0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#15 0x003af51f in start_thread () from /lib/libpthread.so.0
#16 0x002e504e in clone () from /lib/libc.so.6

Thread 3 (Thread 0x9a207b90 (LWP 6873)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3432 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e77c in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x07713946 in ?? () from /usr/lib/libQtCore.so.4
#4  0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#5  0x003af51f in start_thread () from /lib/libpthread.so.0
#6  0x002e504e in clone () from /lib/libc.so.6

Thread 2 (Thread 0x9ac08b90 (LWP 6948)):
#0  0x00b02416 in __kernel_vsyscall ()
#1  0x003b3432 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x0771e77c in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0x07713946 in ?? () from /usr/lib/libQtCore.so.4
#4  0x0771d75e in ?? () from /usr/lib/libQtCore.so.4
#5  0x003af51f in start_thread () from /lib/libpthread.so.0
#6  0x002e504e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb7f839c0 (LWP 6836)):
[KCrash Handler]
#6  0x035d2349 in ?? () from /usr/lib/libQtGui.so.4
#7  0x035bfc85 in QWidget::removeAction () from /usr/lib/libQtGui.so.4
#8  0x00e9da56 in Amarok::TrayIcon::setupMenu (this=0x9dab0f0) at /usr/src/debug/amarok/src/Systray.cpp:404
#9  0x00ea0096 in Amarok::TrayIcon::engineStateChanged (this=0x9dab0f0, state=<value optimized out>) at /usr/src/debug/amarok/src/Systray.cpp:272
#10 0x00dfa570 in EngineSubject::stateChangedNotify (this=0x930fc20, newState=Phonon::StoppedState, oldState=Phonon::PlayingState) at /usr/src/debug/amarok/src/EngineObserver.cpp:106
#11 0x00df8173 in EngineController::slotStateChanged (this=0x930fc18, newState=Phonon::StoppedState, oldState=Phonon::PlayingState) at /usr/src/debug/amarok/src/EngineController.cpp:704
#12 0x00df90e8 in EngineController::qt_metacall (this=0x930fc18, _c=QMetaObject::InvokeMetaMethod, _id=28, _a=0xbf9b93c8) at /usr/src/debug/amarok/i386-redhat-linux-gnu/src/EngineController.moc:154
#13 0x07822df0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0x07823b72 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#15 0x07912819 in Phonon::MediaObject::stateChanged () from /usr/lib/libphonon.so.4
#16 0x079139b0 in Phonon::MediaObjectPrivate::_k_stateChanged () from /usr/lib/libphonon.so.4
#17 0x07914ffb in Phonon::MediaObject::qt_metacall () from /usr/lib/libphonon.so.4
#18 0x07822df0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0x07823b72 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#20 0x0116e0e9 in Phonon::MediaSource::type () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#21 0x01171d42 in Phonon::MediaSource::type () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#22 0x01172112 in Phonon::MediaSource::type () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#23 0x0781bf8b in QMetaCallEvent::placeMetaCall () from /usr/lib/libQtCore.so.4
#24 0x0781db01 in QObject::event () from /usr/lib/libQtCore.so.4
#25 0x0357568c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#26 0x0357d4ce in QApplication::notify () from /usr/lib/libQtGui.so.4
#27 0x0543efdd in KApplication::notify () from /usr/lib/libkdeui.so.5
#28 0x0780e1c1 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#29 0x0780ee45 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#30 0x0780f03d in QCoreApplication::sendPostedEvents () from /usr/lib/libQtCore.so.4
#31 0x07838baf in ?? () from /usr/lib/libQtCore.so.4
#32 0x008c6238 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#33 0x008c98e3 in ?? () from /lib/libglib-2.0.so.0
#34 0x008c9aa1 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#35 0x078387f8 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#36 0x0360e515 in ?? () from /usr/lib/libQtGui.so.4
#37 0x0780c88a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#38 0x0780ca4a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#39 0x0780f105 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#40 0x03575507 in QApplication::exec () from /usr/lib/libQtGui.so.4
#41 0x0804bee8 in main (argc=1, argv=0xbf9ba194) at /usr/src/debug/amarok/src/main.cpp:129
Comment 6 Mark Kretschmann 2009-02-19 10:43:54 UTC
@Eelko: I'm currently working on a more generic solution for this problem (lists of dangling QActions pointers), as we noticed that it affects multiple components of Amarok.
Comment 7 Mark Kretschmann 2009-02-19 12:02:15 UTC
Another backtrace, this time from Leo Franchi, on OSX. It's again the QAction pointers stuff:


Thread 0 Crashed:
0   QtGui                         	0x046d587b QList<QWidget*>::removeAll(QWidget* const&) + 11
1   QtGui                         	0x046c4c36 QWidget::removeAction(QAction*) + 70
2   libamaroklib.1.dylib          	0x00b5bc2f Amarok::TrayIcon::setupMenu() + 127 (qlist.h:219)
3   libamaroklib.1.dylib          	0x00b5eeee Amarok::TrayIcon::engineStateChanged(Phonon::State, Phonon::State) + 110 (Systray.cpp:285)
4   libamaroklib.1.dylib          	0x00aa2d3e EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) + 462 (qhash.h:403)
5   libamaroklib.1.dylib          	0x00a9fb2b EngineController::slotStateChanged(Phonon::State, Phonon::State) + 107 (EngineController.cpp:706)
6   libamaroklib.1.dylib          	0x00aa1b4b EngineController::qt_metacall(QMetaObject::Call, int, void**) + 1019 (EngineController.moc:154)
7   QtCore                        	0x024c2280 QMetaObject::activate(QObject*, int, int, void**) + 528
8   phonon                        	0x0369ae74 Phonon::MediaObject::stateChanged(Phonon::State, Phonon::State) + 68
9   phonon                        	0x0369d2c6 Phonon::MediaObjectPrivate::_k_stateChanged(Phonon::State, Phonon::State) + 534
10  phonon                        	0x0369db6e Phonon::MediaObject::qt_metacall(QMetaObject::Call, int, void**) + 526
11  QtCore                        	0x024c2280 QMetaObject::activate(QObject*, int, int, void**) + 528
12  libphonon_qt7.bundle          	0x1a546891 Phonon::QT7::MediaObject::setState(Phonon::State) + 95
13  libphonon_qt7.bundle          	0x1a548bb8 Phonon::QT7::MediaObject::stop() + 32
14  libamaroklib.1.dylib          	0x00a9cc69 EngineController::~EngineController() + 73
15  libamaroklib.1.dylib          	0x00a98bdf EngineController::destroy() + 31 (EngineController.cpp:62)
16  libamaroklib.1.dylib          	0x00a8d1bd App::~App() + 733
17                                	0x0000d055 main + 14405 (main.cpp:130)
18                                	0x000097d6 start + 54
Comment 8 Mark Kretschmann 2009-02-20 10:22:14 UTC
*** Bug 185005 has been marked as a duplicate of this bug. ***
Comment 9 Mark Kretschmann 2009-02-20 18:04:59 UTC
SVN commit 929114 by markey:

Beginnings of SmartPointerList class:
A QList for storing pointers to QObjects, that automatically removes
the pointers when objects are deleted.

The evil scheme behind this idea is to fix many of our crashes that
result from storing (caching) QLists of pointers to QActions in various
places in Amarok. The problem is that sometimes these QActions get
deleted, and we end up with dangling pointers in these lists. That's
causing crashes like in BR 184630, when we dereference these dangling
pointers.

Now my class does have a few drawbacks still, which may be fixable with
more tweaking, or maybe not:

* Does not work with Qt's foreach(), as it subclasses QObject. You need
 to iterate over the list in traditional ways.
* Casting of pointers is sometimes needed

For testing, I did start to port some of our QList<QAction*> to
SmartPointerList, but not all of them.

You be the judge if this class is a good idea and a viable path.
I'm requesting code review and discussion.

CCMAIL: amarok-devel@kde.org
CCBUG: 184630

 M  +1 -0      CMakeLists.txt  
 M  +3 -11     GlobalCurrentTrackActions.cpp  
 M  +2 -3      GlobalCurrentTrackActions.h  
 A             SmartPointerList.cpp   GlobalCurrentTrackActions.h#929087 [License: GPL (v2+)]
 A             SmartPointerList.h   GlobalCurrentTrackActions.h#929087 [License: GPL (v2+)]
 M  +9 -12     Systray.cpp  
 M  +2 -1      Systray.h  
 M  +16 -9     widgets/MainToolbar.cpp  
 M  +2 -1      widgets/MainToolbar.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=929114
Comment 10 Mark Kretschmann 2009-02-22 09:27:43 UTC
SVN commit 929800 by markey:

Port some more QList<QAction*> to SmartPointerList.

CCBUG: 184630

 M  +2 -1      ColumnContainment.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=929800
Comment 11 Mark Kretschmann 2009-02-22 10:10:00 UTC
SVN commit 929810 by markey:

More SmartPointerList usage, this time in SideBarWidget (a problematic
class anyway).

CCBUG: 184630

 M  +8 -4      SmartPointerList.h  
 M  +3 -3      widgets/SidebarWidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=929810
Comment 12 Mark Kretschmann 2009-02-27 17:29:22 UTC
This should be fixed now, after our latest and greatest invention (SmartPointerList) had been deployed.

Everyone: Please test with latest SVN trunk :)