Bug 325723 - Amarok (apparently) crashes during quit
Summary: Amarok (apparently) crashes during quit
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Unclassified
Component: Playback (show other bugs)
Version: 2.8.0
Platform: openSUSE RPMs Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords: drkonqi
: 328889 332484 333682 335095 387595 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-06 21:22 UTC by Doug
Modified: 2017-12-10 00:40 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9


Attachments
New crash information added by DrKonqi (11.92 KB, text/plain)
2013-10-07 03:45 UTC, Doug
Details
New crash information added by DrKonqi (34.31 KB, text/plain)
2014-06-02 20:43 UTC, Miraç Satıç
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug 2013-10-06 21:22:22 UTC
Application: amarok (2.8.0)
KDE Platform Version: 4.10.5 "release 1"
Qt Version: 4.8.4
Operating System: Linux 3.7.10-1.16-desktop x86_64
Distribution: "openSUSE 12.3 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

I think I stopped playing the audio file and then I told Amarok to quit.  Amarok did quit, but then the crash reporting assisant popped up to let me know it also crashed.  To user, looks like a normal quit except for the crash assistant.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fad7b2ad780 (LWP 3778))]

Thread 10 (Thread 0x7fad4bffe700 (LWP 3788)):
#0  0x00007fad76179d11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad56f5de66 in my_service_thread_sleep () from /usr/lib64/libmysqld.so.18
#2  0x00007fad56f2dcd7 in ma_checkpoint_background () from /usr/lib64/libmysqld.so.18
#3  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#4  0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fad4a082700 (LWP 3789)):
#0  0x00007fad76179964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad7865b62b in wait (time=18446744073709551615, this=0x2767980) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1ecf4c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fad75288981 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2767830, th=0x2635150) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fad7528b1cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x2635150) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fad7528a03f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fad4a081e00, parent=0x2767830, th=th@entry=0x2635150) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:87
#6  0x00007fad7528a0cb in ThreadWeaver::Thread::run (this=0x2635150) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:142
#7  0x00007fad7865b0cc in QThreadPrivate::start (arg=0x2635150) at thread/qthread_unix.cpp:338
#8  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#9  0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fad37fff700 (LWP 3790)):
#0  0x00007fad76178e0f in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007fad722f2aa1 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fad722b532b in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fad722b59cb in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fad722b5bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007fad787852e6 in QEventDispatcherGlib::processEvents (this=0x7fad300008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fad78755adf in QEventLoop::processEvents (this=this@entry=0x7fad37ffedd0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fad78755d68 in QEventLoop::exec (this=0x7fad37ffedd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fad786580f0 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#9  0x00007fad7873629f in QInotifyFileSystemWatcherEngine::run (this=0x276adb0) at io/qfilesystemwatcher_inotify.cpp:256
#10 0x00007fad7865b0cc in QThreadPrivate::start (arg=0x276adb0) at thread/qthread_unix.cpp:338
#11 0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#12 0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fad48b57700 (LWP 3791)):
#0  0x00007fad76179964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad7865b62b in wait (time=18446744073709551615, this=0x2767980) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1ecf4c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fad75288981 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2767830, th=0x2944e00) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fad7528b1cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x2944e00) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fad7528a03f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fad48b56e00, parent=0x2767830, th=th@entry=0x2944e00) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:87
#6  0x00007fad7528a0cb in ThreadWeaver::Thread::run (this=0x2944e00) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:142
#7  0x00007fad7865b0cc in QThreadPrivate::start (arg=0x2944e00) at thread/qthread_unix.cpp:338
#8  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#9  0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fad377fe700 (LWP 3792)):
#0  0x00007fad76179964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad7865b62b in wait (time=18446744073709551615, this=0x2767980) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1ecf4c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fad75288981 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2767830, th=0x2a7f210) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fad7528b1cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x2a7f210) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fad7528b1e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x2a7f210) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fad7528a03f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fad377fde00, parent=0x2767830, th=th@entry=0x2a7f210) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:87
#7  0x00007fad7528a0cb in ThreadWeaver::Thread::run (this=0x2a7f210) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:142
#8  0x00007fad7865b0cc in QThreadPrivate::start (arg=0x2a7f210) at thread/qthread_unix.cpp:338
#9  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#10 0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fad36ffd700 (LWP 3793)):
#0  0x00007fad76179964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad7865b62b in wait (time=18446744073709551615, this=0x2767980) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1ecf4c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fad75288981 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x2767830, th=0x28f8880) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007fad7528b1cb in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x28f8880) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007fad7528b1e4 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1eaeb10, th=0x28f8880) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007fad7528a03f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7fad36ffce00, parent=0x2767830, th=th@entry=0x28f8880) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:87
#7  0x00007fad7528a0cb in ThreadWeaver::Thread::run (this=0x28f8880) at /usr/src/debug/kdelibs-4.10.5/threadweaver/Weaver/Thread.cpp:142
#8  0x00007fad7865b0cc in QThreadPrivate::start (arg=0x28f8880) at thread/qthread_unix.cpp:338
#9  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#10 0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fad27de1700 (LWP 3796)):
#0  0x00007fad76179964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fad6e37f7c7 in ?? () from /usr/lib64/libQtWebKit.so.4
#2  0x00007fad6e37f7f9 in ?? () from /usr/lib64/libQtWebKit.so.4
#3  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#4  0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fad275e0700 (LWP 3797)):
#0  0x00007fad72287600 in pthread_mutex_unlock@plt () from /usr/lib64/libglib-2.0.so.0
#1  0x00007fad722f2aa1 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fad722b56c9 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fad722b5b08 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fad722b5bc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007fad787852e6 in QEventDispatcherGlib::processEvents (this=0x7fad1c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fad78755adf in QEventLoop::processEvents (this=this@entry=0x7fad275dfe00, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fad78755d68 in QEventLoop::exec (this=0x7fad275dfe00, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fad786580f0 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#9  0x00007fad7865b0cc in QThreadPrivate::start (arg=0x322a820) at thread/qthread_unix.cpp:338
#10 0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#11 0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fad25d4d700 (LWP 3802)):
#0  0x00007fad77fde1cd in nanosleep () from /lib64/libc.so.6
#1  0x00007fad77fde071 in sleep () from /lib64/libc.so.6
#2  0x00007fad742e02b2 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fad745ed660 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2363
#3  0x00007fad742e0339 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0x00007fad76175e0f in start_thread () from /lib64/libpthread.so.0
#5  0x00007fad7800d44d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fad7b2ad780 (LWP 3778)):
[KCrash Handler]
#6  0x0000000100000003 in ?? ()
#7  0x00007fad74b31038 in Phonon::MediaNodePrivate::backendObject() () from /usr/lib64/libphonon.so.4
#8  0x00007fad74b46a4a in Phonon::VolumeFaderEffect::fadeTo(float, int) () from /usr/lib64/libphonon.so.4
#9  0x00007fad7a48c775 in Fadeouter::~Fadeouter (this=0x44a8be0, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/playback/Fadeouter.cpp:53
#10 0x00007fad7a48c789 in Fadeouter::~Fadeouter (this=0x44a8be0, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/playback/Fadeouter.cpp:54
#11 0x00007fad787694c2 in QObjectPrivate::deleteChildren (this=this@entry=0x25e2f50) at kernel/qobject.cpp:1916
#12 0x00007fad7876d306 in QObject::~QObject (this=0x25da790, __in_chrg=<optimized out>) at kernel/qobject.cpp:926
#13 0x00007fad74b46d8f in Phonon::VolumeFaderEffect::~VolumeFaderEffect() () from /usr/lib64/libphonon.so.4
#14 0x00007fad787694c2 in QObjectPrivate::deleteChildren (this=this@entry=0x1ec3c90) at kernel/qobject.cpp:1916
#15 0x00007fad7876d306 in QObject::~QObject (this=0x1e74940, __in_chrg=<optimized out>) at kernel/qobject.cpp:926
#16 0x00007fad7a3c4c0b in EngineController::~EngineController (this=0x1e74940, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/EngineController.cpp:101
#17 0x00007fad7a3c4c99 in EngineController::~EngineController (this=0x1e74940, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/EngineController.cpp:121
#18 0x00007fad7a48cbf9 in Amarok::DefaultApplicationController::shutdown (this=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/statemanagement/DefaultApplicationController.cpp:60
#19 0x00007fad7a3bd2a3 in App::~App (this=0x7fffb697ba80, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/App.cpp:244
#20 0x0000000000407b03 in main (argc=1, argv=0x7fffb697bbe8) at /usr/src/debug/amarok-2.8.0/src/main.cpp:329

Reported using DrKonqi
Comment 1 Myriam Schweingruber 2013-10-06 23:16:57 UTC
could you please install the debugging information for phonon and try to get a new backtrace? Might be a problem with phonon, not with Amarok.
Comment 2 Doug 2013-10-07 03:45:07 UTC
Created attachment 82698 [details]
New crash information added by DrKonqi

amarok (2.8.0) on KDE Platform 4.10.5 "release 1" using Qt 4.8.4

- What I was doing when the application crashed:

Played audio file, during which I fetched an album cover by right mouse clicking in main window.  Playback paused twice, I assume reloading album cover, then stopped on its own.  At that point, I closed Amarok (was trying to induce crash after installing Phonon debug symbols)

- Unusual behavior I noticed:

Playback stopped for at least five seconds, did not resume before I closed program (which generated crash)

-- Backtrace (Reduced):
#7  0x00007f262942f038 in Phonon::MediaNodePrivate::backendObject (this=0x1879d40) at /usr/src/debug/phonon-4.6.0/phonon/medianode.cpp:63
#8  0x00007f2629444a4a in Phonon::VolumeFaderEffect::fadeTo (this=<optimized out>, volume=1, fadeTime=300) at /usr/src/debug/phonon-4.6.0/phonon/volumefadereffect.cpp:75
#9  0x00007f262ed8a775 in Fadeouter::~Fadeouter (this=0x40cd000, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/playback/Fadeouter.cpp:53
#10 0x00007f262ed8a789 in Fadeouter::~Fadeouter (this=0x40cd000, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/playback/Fadeouter.cpp:54
#11 0x00007f262d0674c2 in QObjectPrivate::deleteChildren (this=this@entry=0x1871f10) at kernel/qobject.cpp:1916
Comment 3 Myriam Schweingruber 2013-10-07 05:25:41 UTC
Thank you for the fast feedback, that is what I expected, the crash is in Phonon. Reassigning.
Comment 4 Harald Sitter 2013-10-07 13:01:08 UTC
Amarok bug.

VFE gets destroyed
#13 0x00007f2629444d8f in ~VolumeFaderEffect (this=0x1871340, __in_chrg=<optimized out>) at /usr/src/debug/phonon-4.6.0/phonon/volumefadereffect.h:50

VFE cleans up its QObject children
#11 0x00007f262d0674c2 in QObjectPrivate::deleteChildren (this=this@entry=0x1871f10) at kernel/qobject.cpp:1916

One of them is Fadeouter
#10 0x00007f262ed8a789 in Fadeouter::~Fadeouter (this=0x40cd000, __in_chrg=<optimized out>) at /usr/src/debug/amarok-2.8.0/src/playback/Fadeouter.cpp:54

Fadeouter tries to call the same VFE's ::fadeTo
#8  0x00007f2629444a4a in Phonon::VolumeFaderEffect::fadeTo (this=<optimized out>, volume=1, fadeTime=300) at /usr/src/debug/phonon-4.6.0/phonon/volumefadereffect.cpp:75

You are now within a half destroyed VFE.

Crash because VFEPrivate has already been thrown away so vtable lookup ends up in garbage, resulting in SIGSEV
#7  0x00007f262942f038 in Phonon::MediaNodePrivate::backendObject (this=0x1879d40) at /usr/src/debug/phonon-4.6.0/phonon/medianode.cpp:63
Comment 5 Myriam Schweingruber 2013-12-17 03:08:22 UTC
*** Bug 328889 has been marked as a duplicate of this bug. ***
Comment 6 Matěj Laitl 2013-12-17 11:36:07 UTC
Git commit 8804bf898122bf4e23b3d7660bad448759f34066 by Matěj Laitl.
Committed on 17/12/2013 at 11:35.
Pushed by laitl into branch 'master'.

playback: fix crash on quit in the middle of a fadeout

My assumption was incorrect, a child must still track its parent using
QWeakPointer to be safe.

Thanks for investigation from Harald Sitter, you were absolutely
correct, our lord-president. :)
FIXED-IN: 2.9
BACKPORT

M  +1    -0    ChangeLog
M  +3    -3    src/playback/Fadeouter.cpp
M  +1    -1    src/playback/Fadeouter.h

http://commits.kde.org/amarok/8804bf898122bf4e23b3d7660bad448759f34066
Comment 7 Myriam Schweingruber 2014-03-23 23:05:48 UTC
*** Bug 332484 has been marked as a duplicate of this bug. ***
Comment 8 Myriam Schweingruber 2014-04-21 09:59:45 UTC
*** Bug 333682 has been marked as a duplicate of this bug. ***
Comment 9 Myriam Schweingruber 2014-05-21 00:26:48 UTC
*** Bug 335095 has been marked as a duplicate of this bug. ***
Comment 10 Miraç Satıç 2014-06-02 20:43:46 UTC
Created attachment 86973 [details]
New crash information added by DrKonqi

amarok (2.8.0) on KDE Platform 4.13.0 using Qt 4.8.6

- What I was doing when the application crashed:

- Unusual behavior I noticed:

I stopped the music then I got this error message when closing Amarok.

-- Backtrace (Reduced):
#7  0x00007f613ebc5118 in Phonon::MediaNodePrivate::backendObject (this=this@entry=0x1506ed0) at ../../phonon/medianode.cpp:61
#8  0x00007f613ebdfd6a in Phonon::VolumeFaderEffect::fadeTo (this=<optimized out>, volume=1, fadeTime=300) at ../../phonon/volumefadereffect.cpp:73
#9  0x00007f613ebdfdcd in Phonon::VolumeFaderEffect::fadeIn (this=<optimized out>, fadeTime=<optimized out>) at ../../phonon/volumefadereffect.cpp:62
#10 0x00007f6143f210d5 in Fadeouter::~Fadeouter (this=0x32a8b90, __in_chrg=<optimized out>) at ../../src/playback/Fadeouter.cpp:53
#11 0x00007f6143f210e9 in Fadeouter::~Fadeouter (this=0x32a8b90, __in_chrg=<optimized out>) at ../../src/playback/Fadeouter.cpp:54
Comment 11 Myriam Schweingruber 2014-06-03 07:56:41 UTC
Please read the bug report before submitting information, this is already solved ahead of your version.
Comment 12 Myriam Schweingruber 2017-12-10 00:40:38 UTC
*** Bug 387595 has been marked as a duplicate of this bug. ***