Bug 290533

Summary: Amarok crashed while using APG [@ APG::ConstraintSolver::select_population]
Product: [Applications] amarok Reporter: Jessie A. Morris <jessie>
Component: Playlists/Automated Playlist GeneratorAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: crash CC: aedo999, alinda.helleman, dirtpilot1980, kfunk, stharward
Priority: NOR    
Version: 2.4.90 (2.5 beta)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.6
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Jessie A. Morris 2012-01-03 21:25:55 UTC
Application: amarok (2.4.90)
KDE Platform Version: 4.7.95 (4.8 RC1 (4.7.95)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-14-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
I selected one of the example Automated Playlist Generator (favorite radio station) and then selected a different example (one hour of tracks from different artists). After clicking the 'Run APG' button, it crashed.

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

Thread 13 (Thread 0x7f337b360700 (LWP 3141)):
#0  0x00007f3399088773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f339145c03f in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2  0x00007f339144d45c in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#3  0x00007f339144dac9 in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4  0x00007f339144db80 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5  0x00007f339145bfef in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6  0x00007f338cb1bc78 in ?? () from /usr/lib/x86_64-linux-gnu/libpulsecommon-1.0.so
#7  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#8  0x00007f3395896efc in start_thread (arg=0x7f337b360700) at pthread_create.c:304
#9  0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f336e220700 (LWP 3170)):
#0  0x00007f3399088773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f3393df1f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3393df2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3399a06f3e in QEventDispatcherGlib::processEvents (this=0x18d72c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f33999dacf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f33999daef7 in QEventLoop::exec (this=0x7f336e21fcd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f33998f227f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007f33999bdcbf in QInotifyFileSystemWatcherEngine::run (this=0x18d6be0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x18d6be0) at thread/qthread_unix.cpp:331
#9  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007f3395896efc in start_thread (arg=0x7f336e220700) at pthread_create.c:304
#11 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f336bcc8700 (LWP 3197)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f33998f51ab in wait (time=18446744073709551615, this=0x1c108d0) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1c10af0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f3396e25864 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1c10730, th=0x1c10fe0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f3396e27e0b in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1c10fe0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1c10fe0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f3396e26ccf in ThreadWeaver::ThreadRunHelper::run (this=0x7f336bcc7d20, parent=0x1c10730, th=0x1c10fe0) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007f3396e26d5b in ThreadWeaver::Thread::run (this=0x1c10fe0) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1c10fe0) at thread/qthread_unix.cpp:331
#9  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007f3395896efc in start_thread (arg=0x7f336bcc8700) at pthread_create.c:304
#11 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f3369136700 (LWP 3263)):
#0  0x00007f3399088773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f3393df1f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3393df2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3399a06f3e in QEventDispatcherGlib::processEvents (this=0x1ebb050, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f33999dacf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f33999daef7 in QEventLoop::exec (this=0x7f3369135cd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f33998f227f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007f33999bdcbf in QInotifyFileSystemWatcherEngine::run (this=0x1eba1b0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1eba1b0) at thread/qthread_unix.cpp:331
#9  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007f3395896efc in start_thread (arg=0x7f3369136700) at pthread_create.c:304
#11 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f3368718700 (LWP 3268)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f33998f51ab in wait (time=18446744073709551615, this=0x1c108d0) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1c10af0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f3396e25864 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1c10730, th=0x1d27be0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f3396e27e0b in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1d27be0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1d27be0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1d27be0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f3396e26ccf in ThreadWeaver::ThreadRunHelper::run (this=0x7f3368717d20, parent=0x1c10730, th=0x1d27be0) at ../../../threadweaver/Weaver/Thread.cpp:87
#8  0x00007f3396e26d5b in ThreadWeaver::Thread::run (this=0x1d27be0) at ../../../threadweaver/Weaver/Thread.cpp:142
#9  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1d27be0) at thread/qthread_unix.cpp:331
#10 0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#11 0x00007f3395896efc in start_thread (arg=0x7f3368718700) at pthread_create.c:304
#12 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f3367d0c700 (LWP 3269)):
[KCrash Handler]
#6  QList<KSharedPtr<Meta::Track> >::~QList (this=0x100000001, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:718
#7  0x00007f339b5d6191 in APG::ConstraintSolver::select_population (this=0x22fcae0, population=..., best=0x7f3338409cf0) at ../../src/playlistgenerator/ConstraintSolver.cpp:261
#8  0x00007f339b5da0ff in APG::ConstraintSolver::run (this=0x22fcae0) at ../../src/playlistgenerator/ConstraintSolver.cpp:167
#9  0x00007f3396e27491 in ThreadWeaver::JobRunHelper::runTheJob (this=0x7f3367d0bca0, th=0x1f06a10, job=0x22fcae0) at ../../../threadweaver/Weaver/Job.cpp:106
#10 0x00007f3396e275bc in ThreadWeaver::Job::execute (this=0x22fcae0, th=0x1f06a10) at ../../../threadweaver/Weaver/Job.cpp:135
#11 0x00007f3396e26c9f in ThreadWeaver::ThreadRunHelper::run (this=0x7f3367d0bd20, parent=0x1c10730, th=0x1f06a10) at ../../../threadweaver/Weaver/Thread.cpp:95
#12 0x00007f3396e26d5b in ThreadWeaver::Thread::run (this=0x1f06a10) at ../../../threadweaver/Weaver/Thread.cpp:142
#13 0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1f06a10) at thread/qthread_unix.cpp:331
#14 0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#15 0x00007f3395896efc in start_thread (arg=0x7f3367d0c700) at pthread_create.c:304
#16 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f336750b700 (LWP 3270)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f33998f51ab in wait (time=18446744073709551615, this=0x1c108d0) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1c10af0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f3396e25864 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1c10730, th=0x1f05ae0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f3396e27e0b in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1f05ae0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1f05ae0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1f05ae0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#7  0x00007f3396e27e24 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1c10c10, th=0x1f05ae0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#8  0x00007f3396e26ccf in ThreadWeaver::ThreadRunHelper::run (this=0x7f336750ad20, parent=0x1c10730, th=0x1f05ae0) at ../../../threadweaver/Weaver/Thread.cpp:87
#9  0x00007f3396e26d5b in ThreadWeaver::Thread::run (this=0x1f05ae0) at ../../../threadweaver/Weaver/Thread.cpp:142
#10 0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1f05ae0) at thread/qthread_unix.cpp:331
#11 0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#12 0x00007f3395896efc in start_thread (arg=0x7f336750b700) at pthread_create.c:304
#13 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f33666c9700 (LWP 3273)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f339084cc2c in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007f339084cd59 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x00007f3395896efc in start_thread (arg=0x7f33666c9700) at pthread_create.c:304
#5  0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f3365dc8700 (LWP 3274)):
#0  0x00007f3393df0f2c in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f3393df1dfd in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3393df2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3399a06f3e in QEventDispatcherGlib::processEvents (this=0x7f33600026d0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f33999dacf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f33999daef7 in QEventLoop::exec (this=0x7f3365dc7d00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f33998f227f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x1fc98f0) at thread/qthread_unix.cpp:331
#8  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#9  0x00007f3395896efc in start_thread (arg=0x7f3365dc8700) at pthread_create.c:304
#10 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f335ffff700 (LWP 3305)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f3395e72fe2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f3395e73019 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x00007f3395896efc in start_thread (arg=0x7f335ffff700) at pthread_create.c:304
#5  0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f334cbe3700 (LWP 24878)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f33998f51ab in wait (time=18446744073709551615, this=0x3874ec0) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x3874898, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f339a8cb7d4 in QFileInfoGatherer::run (this=0x3874888) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007f33998f4d05 in QThreadPrivate::start (arg=0x3874888) at thread/qthread_unix.cpp:331
#5  0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#6  0x00007f3395896efc in start_thread (arg=0x7f334cbe3700) at pthread_create.c:304
#7  0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f333ffff700 (LWP 24879)):
#0  0x00007f339589c07f in __pthread_getspecific (key=3) at pthread_getspecific.c:33
#1  0x00007f3393e183dd in g_thread_self () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f3393df0610 in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3393df1d81 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f3393df2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f3399a06f3e in QEventDispatcherGlib::processEvents (this=0x7f333a1fd610, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007f33999dacf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f33999daef7 in QEventLoop::exec (this=0x7f333fffecd0, flags=...) at kernel/qeventloop.cpp:201
#8  0x00007f33998f227f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#9  0x00007f33999bdcbf in QInotifyFileSystemWatcherEngine::run (this=0x38711c0) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007f33998f4d05 in QThreadPrivate::start (arg=0x38711c0) at thread/qthread_unix.cpp:331
#11 0x00007f338afb156c in ?? () from /usr/lib/nvidia-current/libGL.so.1
#12 0x00007f3395896efc in start_thread (arg=0x7f333ffff700) at pthread_create.c:304
#13 0x00007f339909489d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f339c73f7c0 (LWP 3113)):
#0  0x00007f3399088773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f33946fe4f2 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f33946fea3f in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f33946feac4 in xcb_writev () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007f339aeff597 in _XSend () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007f339aeff909 in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#6  0x00007f339aef019f in XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#7  0x00007f339a483f07 in x11EventSourcePrepare (s=0x1190d70, timeout=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:77
#8  0x00007f3393df0ff2 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f3393df1dfd in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f3393df2429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f3399a06ed6 in QEventDispatcherGlib::processEvents (this=0xfaef40, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#12 0x00007f339a48407e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#13 0x00007f33999dacf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#14 0x00007f33999daef7 in QEventLoop::exec (this=0x7fff4afdaa90, flags=...) at kernel/qeventloop.cpp:201
#15 0x00007f33999df789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#16 0x000000000040961e in main (argc=3, argv=0x7fff4afdd288) at ../../src/main.cpp:310

Reported using DrKonqi
Comment 1 Myriam Schweingruber 2012-01-03 22:50:02 UTC
Could you please upgrade to Amarok 2.5 and try again?
Comment 2 Soren Harward 2012-01-04 00:37:45 UTC
Upgrading to 2.5 won't help because it's a problem with Qt, not Amarok.

I know the APG has these idiopathic crashes in QList and QHash.  My guess is that for some reason KSharedPtr doesn't count its references properly when it's in a Qt container, and that in some extremely rare instances the pointer gets deleted while it's still in a container and causes a segfault.  This shouldn't happen.  But I can't reproduce the crash reliably at all, and I haven't been able to wade into the KDE and Qt code and figure out just why the hell a reference-counting pointer class isn't working like a damn reference-counting pointer class ought to work.
Comment 3 Kevin Funk 2012-01-05 12:56:32 UTC
Soren, just had a quick look at your code.

I'm quite sure you miss a "continue" between line 255 and 256 in APG::ConstraintSolver::select_population(). Currently it's possible that "delete it.key()" may operate on a dangling iterator (out of bounds).
Comment 4 Soren Harward 2012-01-05 13:22:25 UTC
Git commit a8650283a1330df4362b4802decee98f51017b0f by Soren Harward.
Committed on 05/01/2012 at 14:18.
Pushed by stharward into branch 'master'.

Fix potential dangling iterator

M  +1    -0    ChangeLog
M  +2    -0    src/playlistgenerator/ConstraintSolver.cpp

http://commits.kde.org/amarok/a8650283a1330df4362b4802decee98f51017b0f
Comment 5 Myriam Schweingruber 2012-01-10 15:16:32 UTC
*** Bug 291096 has been marked as a duplicate of this bug. ***
Comment 6 Alinda Helleman 2012-04-03 20:02:16 UTC
Created attachment 70124 [details]
New crash information added by DrKonqi

amarok (2.5.0) on KDE Platform 4.8.1 (4.8.1) using Qt 4.8.0

- What I was doing when the application crashed: I selected one of APG presets and hit generate. The bar generating playlist was moving and suddenly Amarok crashed.

-- Backtrace (Reduced):
#6  QList<KSharedPtr<Meta::Track> >::~QList (this=0x100000001, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:718
#7  0x00007f2e0481e8b1 in APG::ConstraintSolver::select_population (this=0x3b5bbe0, population=..., best=0x3e1f890) at ../../src/playlistgenerator/ConstraintSolver.cpp:261
#8  0x00007f2e0482281f in APG::ConstraintSolver::run (this=0x3b5bbe0) at ../../src/playlistgenerator/ConstraintSolver.cpp:167
#9  0x00007f2e0003b491 in ThreadWeaver::JobRunHelper::runTheJob (this=0x7f2dc7bffd80, th=0x2a01670, job=0x3b5bbe0) at ../../../threadweaver/Weaver/Job.cpp:106
#10 0x00007f2e0003b5bc in ThreadWeaver::Job::execute (this=0x3b5bbe0, th=0x2a01670) at ../../../threadweaver/Weaver/Job.cpp:135
Comment 7 Alinda Helleman 2012-05-02 12:05:47 UTC
Created attachment 70805 [details]
New crash information added by DrKonqi

amarok (2.5.0) on KDE Platform 4.8.2 (4.8.2) using Qt 4.8.1

- What I was doing when the application crashed: Chose apg then hit execute a few seconds later it crashed.

-- Backtrace (Reduced):
#6  QList<KSharedPtr<Meta::Track> >::~QList (this=0x100000001, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qlist.h:731
#7  0x00007f0c67244291 in APG::ConstraintSolver::select_population (this=0x2971420, population=..., best=0x7f0c18205e20) at ../../src/playlistgenerator/ConstraintSolver.cpp:261
#8  0x00007f0c672481ff in APG::ConstraintSolver::run (this=0x2971420) at ../../src/playlistgenerator/ConstraintSolver.cpp:167
#9  0x00007f0c6298305b in ThreadWeaver::JobRunHelper::runTheJob (this=0x7f0c27009da0, th=0x1bddcc0, job=0x2971420) at ../../../threadweaver/Weaver/Job.cpp:106
#10 0x00007f0c629831cc in ThreadWeaver::Job::execute (this=0x2971420, th=0x1bddcc0) at ../../../threadweaver/Weaver/Job.cpp:135
Comment 8 Soren Harward 2012-05-02 19:54:36 UTC
> Created attachment 70805 [details]
> New crash information added by DrKonqi

This bug was RESOLVED FIXED four months ago.  Posting new crash reports isn't going to help anything.  You're just going to have to wait for 2.6 to come out, or start using the GIT version.
Comment 9 Caywood 2012-11-03 16:54:12 UTC
Created attachment 74969 [details]
New crash information added by DrKonqi

amarok (2.5.0) on KDE Platform 4.8.5 (4.8.5) "release 2" using Qt 4.8.1

- What I was doing when the application crashed:

I clicked on the automatic playlist button.

-- Backtrace (Reduced):
#6  QList<KSharedPtr<Meta::Track> >::~QList (this=0x100000001, __in_chrg=<optimized out>) at /usr/include/QtCore/qlist.h:731
#7  0x00007ffa32801421 in APG::ConstraintSolver::select_population (this=this@entry=0xf3c980, population=..., best=best@entry=0x7ff9dc02f440) at /usr/src/debug/amarok-2.5.0/src/playlistgenerator/ConstraintSolver.cpp:261
#8  0x00007ffa32801d2c in APG::ConstraintSolver::run (this=0xf3c980) at /usr/src/debug/amarok-2.5.0/src/playlistgenerator/ConstraintSolver.cpp:167
#9  0x00007ffa2d73782a in ThreadWeaver::JobRunHelper::runTheJob (this=this@entry=0x7ff9ebffedd0, th=th@entry=0x16db600, job=job@entry=0xf3c980) at /usr/src/debug/kdelibs-4.8.5/threadweaver/Weaver/Job.cpp:106
#10 0x00007ffa2d7379a1 in ThreadWeaver::Job::execute (this=0xf3c980, th=0x16db600) at /usr/src/debug/kdelibs-4.8.5/threadweaver/Weaver/Job.cpp:135
Comment 10 Myriam Schweingruber 2012-11-04 08:52:30 UTC
(In reply to comment #9)
> Created attachment 74969 [details]
> New crash information added by DrKonqi
> 
> amarok (2.5.0) on KDE Platform 4.8.5 (4.8.5) "release 2" using Qt 4.8.1

Please upgrade to Amarok 2.6, this is solved since quite some time. Also adding backtraces to bugs marked as solved in a version ahead of yours is not really useful.