Bug 219888 - Crash while creating dynamic playlist
Summary: Crash while creating dynamic playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-23 23:17 UTC by soopaseb
Modified: 2009-12-24 15:47 UTC (History)
1 user (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 soopaseb 2009-12-23 23:17:58 UTC
Application that crashed: amarok
Version of the application: 2.2.1
KDE Version: 4.3.4 (KDE 4.3.4)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-16-generic i686
Distribution: Ubuntu 9.10

What I was doing when the application crashed:
I upgrade Amarok from 2.2.0 to 2.2.1 to solve a problem of recurrent crashing, but it doesn't seem to have worked.
The new release crashed just after the collection analysis, and after a restart, it crashed after a changing on tag infos.
After this new crash, it crashed again when i try to create a new playlist with my own settings. (it used to work till now...)

 -- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
[Current thread is 1 (Thread 0xb78cc710 (LWP 2478))]

Thread 11 (Thread 0xb6bb5b70 (LWP 2479)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a33142 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b97e4 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0x0293f9ff in ?? () from /usr/lib/libxine.so.1
#4  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 10 (Thread 0xb63b4b70 (LWP 2480)):
#0  0x034b9966 in pthread_mutex_unlock () from /lib/tls/i686/cmov/libc.so.6
#1  0x021d15df in ?? () from /lib/libglib-2.0.so.0
#2  0x021d1863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x0094d067 in QEventDispatcherGlib::processEvents (this=0x9dbcd90, flags=...) at kernel/qeventdispatcher_glib.cpp:329
#4  0x00920c79 in QEventLoop::processEvents (this=0xb63b42a4, flags=) at kernel/qeventloop.cpp:149
#5  0x009210ca in QEventLoop::exec (this=0xb63b42a4, flags=...) at kernel/qeventloop.cpp:201
#6  0x0082eb73 in QThread::exec (this=0x9dbbd30) at thread/qthread.cpp:487
#7  0x027cb20a in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#8  0x00831e32 in QThreadPrivate::start (arg=0x9dbbd30) at thread/qthread_unix.cpp:188
#9  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 9 (Thread 0xb5bb3b70 (LWP 2483)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x0349eba6 in poll () from /lib/tls/i686/cmov/libc.so.6
#2  0x02f38c3b in ?? () from /usr/lib/xine/plugins/1.26/xineplug_ao_out_alsa.so
#3  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 8 (Thread 0xb53b2b70 (LWP 2484)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x029505ee in ?? () from /usr/lib/libxine.so.1
#4  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 7 (Thread 0xb49ffb70 (LWP 2485)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x029505ee in ?? () from /usr/lib/libxine.so.1
#4  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 6 (Thread 0xb41feb70 (LWP 2486)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x029505ee in ?? () from /usr/lib/libxine.so.1
#4  0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 5 (Thread 0xb37ffb70 (LWP 2487)):
[KCrash Handler]
#6  Dynamic::CustomBias::reevaluate (this=0xa54e558, oldEnergy=0.5, oldPlaylist=..., newTrack=..., newTrackPos=96, context=...) at /build/buildd/amarok-2.2.1/src/dynamic/CustomBias.cpp:112
#7  0x00d7bcc8 in Dynamic::BiasSolver::recalculateEnergy (this=0xa72ee80, playlist=..., mutation=..., mutationPos=96) at /build/buildd/amarok-2.2.1/src/dynamic/BiasSolver.cpp:518
#8  0x00d7f963 in Dynamic::BiasSolver::sa_optimize (this=0xa72ee80, playlist=..., i=1000, updateStatus=true) at /build/buildd/amarok-2.2.1/src/dynamic/BiasSolver.cpp:239
#9  0x00d81044 in Dynamic::BiasSolver::run (this=0xa72ee80) at /build/buildd/amarok-2.2.1/src/dynamic/BiasSolver.cpp:185
#10 0x0041d37d in ThreadWeaver::JobRunHelper::runTheJob (this=0xb37ff26c, th=0xa5c1430, job=0xa72ee80) at ../../../threadweaver/Weaver/Job.cpp:106
#11 0x0041d6e1 in ThreadWeaver::Job::execute (this=0xa72ee80, th=0xa5c1430) at ../../../threadweaver/Weaver/Job.cpp:135
#12 0x0041c38a in ThreadWeaver::ThreadRunHelper::run (this=0xb37ff2f4, parent=0xa5bf830, th=0xa5c1430) at ../../../threadweaver/Weaver/Thread.cpp:95
#13 0x0041c9db in ThreadWeaver::Thread::run (this=0xa5c1430) at ../../../threadweaver/Weaver/Thread.cpp:142
#14 0x00831e32 in QThreadPrivate::start (arg=0xa5c1430) at thread/qthread_unix.cpp:188
#15 0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#16 0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 4 (Thread 0xb2ffeb70 (LWP 2488)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x00832e67 in QWaitConditionPrivate::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0x0041bb30 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa5bf830, th=0xa626f10) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0041e19c in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa5bfbb8, th=0xa626f10) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x0041a1fb in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa5bf830, th=0xa626f10) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0041e292 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa626f10) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa626f10, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x0041e2b1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa626f10) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#11 0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa626f10, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#12 0x0041e2b1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa626f10) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#13 0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa626f10, previous=0xa67e678) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#14 0x0041c3be in ThreadWeaver::ThreadRunHelper::run (this=0xb2ffe2f4, parent=0xa5bf830, th=0xa626f10) at ../../../threadweaver/Weaver/Thread.cpp:87
#15 0x0041c9db in ThreadWeaver::Thread::run (this=0xa626f10) at ../../../threadweaver/Weaver/Thread.cpp:142
#16 0x00831e32 in QThreadPrivate::start (arg=0xa626f10) at thread/qthread_unix.cpp:188
#17 0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb27fdb70 (LWP 2489)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x00832e67 in QWaitConditionPrivate::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0x0041bb30 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa5bf830, th=0xa62df58) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0041e19c in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa5bfbb8, th=0xa62df58) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x0041a1fb in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa5bf830, th=0xa62df58) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0041e292 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa62df58) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa62df58, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x0041e2b1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa62df58) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#11 0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa62df58, previous=0xa86d9e0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#12 0x0041c3be in ThreadWeaver::ThreadRunHelper::run (this=0xb27fd2f4, parent=0xa5bf830, th=0xa62df58) at ../../../threadweaver/Weaver/Thread.cpp:87
#13 0x0041c9db in ThreadWeaver::Thread::run (this=0xa62df58) at ../../../threadweaver/Weaver/Thread.cpp:142
#14 0x00831e32 in QThreadPrivate::start (arg=0xa62df58) at thread/qthread_unix.cpp:188
#15 0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#16 0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb1ffcb70 (LWP 2490)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a32e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b978d in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0x00832e67 in QWaitConditionPrivate::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  QWaitCondition::wait (this=0xa5bf848, mutex=0xa5bfad8, time=4294967295) at thread/qwaitcondition_unix.cpp:159
#5  0x0041bb30 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xa5bf830, th=0xa633730) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0x0041e19c in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0xa5bfbb8, th=0xa633730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0x0041a1fb in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0xa5bf830, th=0xa633730) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0x0041e292 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa633730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa633730, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0x0041e2b1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa633730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#11 0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa633730, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#12 0x0041e2b1 in ThreadWeaver::WorkingHardState::applyForWork (this=0xa5bfbb8, th=0xa633730) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#13 0x0041bdb3 in ThreadWeaver::WeaverImpl::applyForWork (this=0xa5bf830, th=0xa633730, previous=0xa5eca40) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#14 0x0041c3be in ThreadWeaver::ThreadRunHelper::run (this=0xb1ffc2f4, parent=0xa5bf830, th=0xa633730) at ../../../threadweaver/Weaver/Thread.cpp:87
#15 0x0041c9db in ThreadWeaver::Thread::run (this=0xa633730) at ../../../threadweaver/Weaver/Thread.cpp:142
#16 0x00831e32 in QThreadPrivate::start (arg=0xa633730) at thread/qthread_unix.cpp:188
#17 0x08a2e80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#18 0x034ac7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb78cc710 (LWP 2478)):
#0  0x00a42422 in __kernel_vsyscall ()
#1  0x08a33142 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x034b97e4 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0x0083181e in thread_sleep (ti=0x1) at thread/qthread_unix.cpp:297
#4  0x00831973 in QThread::msleep (msecs=200) at thread/qthread_unix.cpp:323
#5  0x027f19c4 in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#6  0x025072df in ~FactoryPrivate (this=0x9d63320, __in_chrg=<value optimized out>) at ../3rdparty/phonon/phonon/factory.cpp:199
#7  0x02505da5 in destroy () at ../3rdparty/phonon/phonon/factory.cpp:84
#8  0x0250347b in ~CleanUpGlobalStatic (this=0x25283f0, __in_chrg=<value optimized out>) at ../3rdparty/phonon/phonon/globalstatic_p.h:55
#9  0x0340f05f in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0x0340f0cf in exit () from /lib/tls/i686/cmov/libc.so.6
#11 0x01647d8b in qt_xio_errhandler () at kernel/qapplication_x11.cpp:707
#12 0x00622afa in KApplication::xioErrhandler (this=0xbfd2acf0, dpy=0x9c5e810) at ../../kdeui/kernel/kapplication.cpp:408
#13 0x00622b36 in kde_xio_errhandler (dpy=0x9c5e810) at ../../kdeui/kernel/kapplication.cpp:125
#14 0x05c342e6 in _XIOError () from /usr/lib/libX11.so.6
#15 0x05c3bf8a in ?? () from /usr/lib/libX11.so.6
#16 0x05c3c8c6 in _XEventsQueued () from /usr/lib/libX11.so.6
#17 0x05c255ff in XEventsQueued () from /usr/lib/libX11.so.6
#18 0x01685db5 in x11EventSourceCheck (s=0x9c6b700) at kernel/qguieventdispatcher_glib.cpp:87
#19 0x021d0cd1 in g_main_context_check () from /lib/libglib-2.0.so.0
#20 0x021d147c in ?? () from /lib/libglib-2.0.so.0
#21 0x021d1863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#22 0x0094d02c in QEventDispatcherGlib::processEvents (this=0x9b9dbf0, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#23 0x01685be5 in QGuiEventDispatcherGlib::processEvents (this=0x9b9dbf0, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#24 0x00920c79 in QEventLoop::processEvents (this=0xbfd2ac64, flags=) at kernel/qeventloop.cpp:149
#25 0x009210ca in QEventLoop::exec (this=0xbfd2ac64, flags=...) at kernel/qeventloop.cpp:201
#26 0x0092353f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#27 0x015e4dd7 in QApplication::exec () at kernel/qapplication.cpp:3525
#28 0x08051cdb in main (argc=1, argv=0xbfd2b514) at /build/buildd/amarok-2.2.1/src/main.cpp:227

This bug may be a duplicate of or related to bug 215591

Reported using DrKonqi
Comment 1 Leo Franchi 2009-12-24 06:25:18 UTC
try removing any saved dynamic playlists with a custom bias (last.fm or echonest). can you still get it to crash?
Comment 2 Leo Franchi 2009-12-24 07:06:39 UTC
commit 52244b2ec7d48b99142f2bab09c3877f43fc4d72
Author: Leo Franchi <lfranchi@kde.org>
Date:   Wed Dec 23 23:57:27 2009 -0600

    null pointer guard

    CCBUG: 219888

diff --git a/src/dynamic/CustomBias.cpp b/src/dynamic/CustomBias.cpp
index 0500488..8cda32c 100644
--- a/src/dynamic/CustomBias.cpp
+++ b/src/dynamic/CustomBias.cpp
@@ -106,6 +106,11 @@ Dynamic::CustomBias::reevaluate( double oldEnergy, const Meta::TrackList& oldPla
 {
     DEBUG_BLOCK
     Q_UNUSED( context )
+
+    if( !m_currentEntry ) // wtf it died under us, return oldEnergy
+    {
+        return oldEnergy;
+    }
     double offset = 1.0 / (double)oldPlaylist.size();
Comment 3 soopaseb 2009-12-24 12:46:45 UTC
(In reply to comment #1)
> try removing any saved dynamic playlists with a custom bias (last.fm or
> echonest). can you still get it to crash?

Ok, i removed the custom bias and it has not crashed yet. Hope this bias will work again... thx for the help.
Comment 4 Leo Franchi 2009-12-24 15:47:35 UTC
the fix I just committed should stop the crash. i'm not sure why that was happening---i didn't solve the root cause, just stopped it from crashing. the fix should be in 2.2.2.