Bug 314243

Summary: Amarok crashed when creation of a dynamic playlist based on last.fm is aborted
Product: [Applications] amarok Reporter: Mathias Dietrich <dietrichmathias>
Component: Playlists/Dynamic PlaylistsAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: crash CC: ralf-engels
Priority: NOR    
Version: 2.7.0   
Target Milestone: 2.8   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.8
Sentry Crash Report:
Attachments: Backlog

Description Mathias Dietrich 2013-02-01 10:51:14 UTC
Amarok crashed when creation of a dynamic playlist based on last.fm is aborted



Reproducible: Always

Steps to Reproduce:
1. Create a dynamic playlist based on previous similar track by last.fm -> Amarok calculates
2. Abort the playlist creation by clicking on the abort icon in the progress bar left bottom corner.
Actual Results:  
Amarok crashes

Expected Results:  
Amarok stops the creation withouht crashing
Comment 1 Myriam Schweingruber 2013-02-01 11:01:45 UTC
We need a backtrace, please have a look at http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 Mathias Dietrich 2013-02-01 12:10:13 UTC
Created attachment 76860 [details]
Backlog

I added the backlog of the crash as attachment.
Comment 3 Myriam Schweingruber 2013-02-01 13:38:59 UTC
Backtrace from attachment (please always paste backtraces in comments, else those are not searchable):

Thread 1 (Thread 0x7fc6d4272780 (LWP 8487)):
[KCrash Handler]
#6  isSignalConnected (signal_index=3, this=0x10) at kernel/qobject_p.h:234
#7  QMetaObject::activate (sender=0x1db9020, m=<optimized out>, local_signal_index=0, argv=0x7fff857be4d0) at kernel/qobject.cpp:3456
#8  0x00007fc6d31bd23f in ProgressBar::cancelled (this=this@entry=0x1db9020, _t1=_t1@entry=0x1db9020) at ./ProgressBar.moc:115
#9  0x00007fc6d31bd36b in ProgressBar::cancel (this=0x1db9020) at ../../src/statusbar/ProgressBar.cpp:99
#10 0x00007fc6d31be8b8 in CompoundProgressBar::cancelAll (this=0x1ab0c50) at ../../src/statusbar/CompoundProgressBar.cpp:245
#11 0x00007fc6d14dbf5f in QMetaObject::activate (sender=0x1ab15b0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff857be6f0) at kernel/qobject.cpp:3547
#12 0x00007fc6d2512422 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#13 0x00007fc6d2265d2e in QAbstractButtonPrivate::emitClicked (this=this@entry=0x1ab15e0) at widgets/qabstractbutton.cpp:548
#14 0x00007fc6d2266560 in QAbstractButtonPrivate::click (this=this@entry=0x1ab15e0) at widgets/qabstractbutton.cpp:541
#15 0x00007fc6d22667cc in QAbstractButton::mouseReleaseEvent (this=0x1ab15b0, e=0x7fff857befa0) at widgets/qabstractbutton.cpp:1123
#16 0x00007fc6d232099a in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#17 0x00007fc6d1ef7850 in QWidget::event (this=0x1ab15b0, event=0x7fff857befa0) at kernel/qwidget.cpp:8371
#18 0x00007fc6d1ea7e9c in QApplicationPrivate::notify_helper (this=this@entry=0xe27630, receiver=receiver@entry=0x1ab15b0, e=e@entry=0x7fff857befa0) at kernel/qapplication.cpp:4562
#19 0x00007fc6d1eacb6b in QApplication::notify (this=<optimized out>, receiver=0x1ab15b0, e=0x7fff857befa0) at kernel/qapplication.cpp:4105
#20 0x00007fc6d3c81636 in KApplication::notify (this=0x7fff857c1ed0, receiver=0x1ab15b0, event=0x7fff857befa0) at ../../kdeui/kernel/kapplication.cpp:311
#21 0x00007fc6d14c656e in QCoreApplication::notifyInternal (this=0x7fff857c1ed0, receiver=0x1ab15b0, event=0x7fff857befa0) at kernel/qcoreapplication.cpp:915
#22 0x00007fc6d1ea8cd3 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#23 QApplicationPrivate::sendMouseEvent (receiver=0x1ab15b0, event=0x7fff857befa0, alienWidget=0x1ab15b0, nativeWidget=0x1aafa20, buttonDown=0x7fc6d2984308 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3173
#24 0x00007fc6d1f26554 in QETWidget::translateMouseEvent (this=this@entry=0x1aafa20, event=event@entry=0x7fff857bf720) at kernel/qapplication_x11.cpp:4622
#25 0x00007fc6d1f2544f in QApplication::x11ProcessEvent (this=0x7fff857c1ed0, event=0x7fff857bf720) at kernel/qapplication_x11.cpp:3737
#26 0x00007fc6d1f4cfa2 in x11EventSourceDispatch (s=0xe23100, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#27 0x00007fc6cb5b2ab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007fc6cb5b2de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007fc6cb5b2ea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007fc6d14f4bf6 in QEventDispatcherGlib::processEvents (this=0xcb3ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#31 0x00007fc6d1f4cc1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#32 0x00007fc6d14c52bf in QEventLoop::processEvents (this=this@entry=0x7fff857bfaf0, flags=...) at kernel/qeventloop.cpp:149
#33 0x00007fc6d14c5548 in QEventLoop::exec (this=0x7fff857bfaf0, flags=...) at kernel/qeventloop.cpp:204
#34 0x00007fc6d14ca708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#35 0x000000000040909a in main (argc=2, argv=0x7fff857c2038) at ../../src/main.cpp:329
Comment 4 Myriam Schweingruber 2013-02-01 13:40:06 UTC
Is this reproducible? It clearly is not an Amarok bug, looks more like a Qt problem. Which KDE and Qt versions do you use?
Comment 5 Mathias Dietrich 2013-02-01 14:29:55 UTC
I can reproduce it every time.
I am using KDE 4.10 RC3 (from Kbuntu PPA) and Qt 4.8.2 from Ubuntu's repos.
Comment 6 Myriam Schweingruber 2013-02-01 14:37:57 UTC
And you always get the same backtrace? Because the one you posted doesn't show anything on the Amarok side
Comment 7 Ralf Engels 2013-02-01 18:41:21 UTC
You have to wait a while and then press abort, but I can reproduce it here.

Last debug output:

amarok:     BEGIN: void ProgressBar::cancel() 
amarok:       cancelling operation:  "Generating playlist..." 
amarok:       BEGIN: virtual void Dynamic::BiasedPlaylist::requestAbort() 
amarok:       END__: virtual void Dynamic::BiasedPlaylist::requestAbort() [Took: 0s] 
KCrash: Application 'amarok' crashing...

Maybe something is deleted in requestAbort that shouldn't.
Comment 8 Ralf Engels 2013-02-06 11:04:53 UTC
Git commit 95e694452be6c040bb8040f39b260c97b214f1c0 by Ralf Engels.
Committed on 06/02/2013 at 01:02.
Pushed by rengels into branch 'master'.

Fix crashed when dynamic playlist based on last.fm is aborted

Since the bias solver runs in a different thread care must be taken
for signals.
FIXED-IN: 2.8

M  +3    -3    src/browsers/BrowserMessageArea.cpp

http://commits.kde.org/amarok/95e694452be6c040bb8040f39b260c97b214f1c0