Bug 258848 - Amarok crashes when playing [@ AmarokDownloadHelper::resultString]
Summary: Amarok crashes when playing [@ AmarokDownloadHelper::resultString]
Status: RESOLVED DUPLICATE of bug 261839
Alias: None
Product: amarok
Classification: Applications
Component: Playback (show other bugs)
Version: 2.3.2
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 21:59 UTC by Richard
Modified: 2011-01-09 13:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
A backtrace of the crash (26.54 KB, text/x-log)
2010-12-18 07:30 UTC, Richard
Details
The file that the KDE Crash Handler produced (26.87 KB, text/x-log)
2010-12-18 07:37 UTC, Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2010-12-04 21:59:04 UTC
Version:           2.3.2 (using KDE 4.5.4) 
OS:                Linux

I have a bunch of albums that I ripped from CDs into FLAC files. Whenever I try to have amarok play them, I want it to loop, so I have Repeat Album set. If I leave Amarok playing like this, it will crash.

Reproducible: Always

Steps to Reproduce:
1. Play a ripped album
2. Set Repeat Album
3. Leave it for a day

Actual Results:  
It crashes

Expected Results:  
It should keep playing.

I use ALSA with the Linux 2.6.36.1 kernel.
Comment 1 Myriam Schweingruber 2010-12-05 17:52:32 UTC
Thank you for your report, but we need a backtrace.
Comment 2 Christoph Feck 2010-12-06 02:23:30 UTC
For more information, see http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 3 Richard 2010-12-06 03:17:52 UTC
(In reply to comment #2)
> For more information, see
> http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports

Thanks for the information. It will take about a day for me to recompile my operating system. I like to leave Amarok playing overnight and I usually see a crash after doing that, so it will take about 36 hours for me to generate a backtrace.
Comment 4 Richard 2010-12-06 17:50:58 UTC
The recent KDE 4.5.4 update seems to have fixed this. Despite having it occur within an hour in the past, I ran Amarok overnight as my system was compiling and I could not observe a crash. I had have so busy over the past few week that I thought that the upgrade had occurred before the most recent crash, but that does not appear to be the case.
Comment 5 Myriam Schweingruber 2010-12-06 18:42:57 UTC
Thank you for the feedback.
Comment 6 Richard 2010-12-18 07:30:49 UTC
Created attachment 55034 [details]
A backtrace of the crash

(In reply to comment #5)
> Thank you for the feedback.

For some odd reason, there went a period of time when I could not reproduce this, but soon after the bug report was closed, I had this issue occur again. It has happened several times. KKDE's crash reporting assistant did not appear to generate any useful information the first time I checked, but tonight I checked for a backtrace when it happened again and I was able to get one. It is attached to this comment.
Comment 7 Richard 2010-12-18 07:31:32 UTC
I am reopening this bug now that I can reproduce the crash again and I have a backtrace of the crash.
Comment 8 Richard 2010-12-18 07:37:07 UTC
Created attachment 55035 [details]
The file that the KDE Crash Handler produced

I tried to close the KDE Crash Handler and discovered that it has the ability to generate output files with information. Here is the file that it generated.
Comment 9 Myriam Schweingruber 2010-12-19 14:39:29 UTC
Backtrace from Comment #6 (please always paste backtraces inline, else those are not searchable). The backtrace in comment #8 is identical.

FYI: this is a totally different crash, related to a 3rd-party script you use and it needs to be reported to the script author asn we do not handle 3rd-party  bugs.


Thread 1 (Thread 0x7f9d0b3b67a0 (LWP 17407)):
[KCrash Handler]
#6  find<QTJSC::UStringImpl*, QTWTF::IdentityHashTranslator<QTJSC::UStringImpl*, QTJSC::UStringImpl*, QTWTF::StrHash<QTJSC::UStringImpl*> > > (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h:763
#7  find (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h:323
#8  find (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h:166
#9  remove (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/HashSet.h:240
#10 remove (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp:61
#11 QTJSC::Identifier::remove (r=0x7f9cdbe25b70) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp:239
#12 0x00007f9d04a514b5 in QTJSC::UStringImpl::~UStringImpl (this=0x20, __in_chrg=<value optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp:68
#13 0x00007f9d04a18d6a in QTJSC::JSString::~JSString() () from /usr/lib64/qt4/libQtScript.so.4
#14 0x00007f9d049cf8e0 in QTJSC::Heap::allocate (this=0x7f9cdefb5218, s=<value optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp:419
#15 0x00007f9d04ab31e6 in operator new (this=0x7fffa28d5630, engine=<value optimized out>, val=<value optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSCell.h:162
#16 jsString (this=0x7fffa28d5630, engine=<value optimized out>, val=<value optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSString.h:445
#17 jsString (this=0x7fffa28d5630, engine=<value optimized out>, val=<value optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSString.h:484
#18 QScriptValue::QScriptValue (this=0x7fffa28d5630, engine=<value optimized out>, val=<value optimized out>) at api/qscriptvalue.cpp:309
#19 0x00007f9d0a4f3922 in AmarokDownloadHelper::resultString (this=<value optimized out>, url=<value optimized out>, data=<value optimized out>, e=<value optimized out>) at /var/tmp/portage/media-sound/amarok-2.3.2-r1/work/amarok-2.3.2/src/scriptengine/AmarokNetworkScript.cpp:220
#20 0x00007f9d0a4f40d0 in AmarokDownloadHelper::qt_metacall (this=0x2daeae0, _c=<value optimized out>, _id=0, _a=0x7fffa28d5870) at /var/tmp/portage/media-sound/amarok-2.3.2-r1/work/amarok-2.3.2_build/src/AmarokNetworkScript.moc:173
#21 0x00007f9d0979b42c in QMetaMethod::invoke (this=0x7fffa28d5bc0, object=0x2daeae0, connectionType=<value optimized out>, returnValue=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1578
#22 0x00007f9d0a4535b2 in NetworkAccessManagerProxy::NetworkAccessManagerProxyPrivate::_replyFinished() () from /usr/lib/libamaroklib.so.1
#23 0x00007f9d0a451cc2 in NetworkAccessManagerProxy::qt_metacall (this=0x2daece0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa28d5df0) at /var/tmp/portage/media-sound/amarok-2.3.2-r1/work/amarok-2.3.2_build/src/NetworkAccessManagerProxy.moc:77
#24 0x00007f9d097aa21f in QMetaObject::activate (sender=0x31b6b40, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1d4ee28) at kernel/qobject.cpp:3272
#25 0x00007f9d033d450b in KDEPrivate::AccessManagerReply::jobDone (this=0x31b6b40, kJob=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/accessmanagerreply_p.cpp:248
#26 0x00007f9d033d4d13 in KDEPrivate::AccessManagerReply::qt_metacall (this=0x31b6b40, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa28d62d0) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4_build/kio/accessmanagerreply_p.moc:83
#27 0x00007f9d097aa21f in QMetaObject::activate (sender=0x2fc5760, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1d4ee28) at kernel/qobject.cpp:3272
#28 0x00007f9d09bfbe62 in KJob::result (this=0x20, _t1=0x2fc5760) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4_build/kdecore/kjob.moc:194
#29 0x00007f9d09bfc100 in KJob::emitResult (this=0x2fc5760) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kdecore/jobs/kjob.cpp:312
#30 0x00007f9d034112c3 in KIO::SimpleJob::slotFinished (this=0x2fc5760) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/job.cpp:525
#31 0x00007f9d03411bd2 in KIO::TransferJob::slotFinished (this=0x2fc5760) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/job.cpp:1114
#32 0x00007f9d0340f6a1 in KIO::TransferJob::qt_metacall (this=0x2fc5760, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa28d6710) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4_build/kio/jobclasses.moc:367
#33 0x00007f9d097aa21f in QMetaObject::activate (sender=0x2bee530, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1d4ee28) at kernel/qobject.cpp:3272
#34 0x00007f9d034bfcdd in KIO::SlaveInterface::dispatch (this=0x2bee530, _cmd=104, rawdata=...) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/slaveinterface.cpp:175
#35 0x00007f9d034bcd1d in KIO::SlaveInterface::dispatch (this=0x2bee530) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/slaveinterface.cpp:91
#36 0x00007f9d034b0746 in KIO::Slave::gotInput (this=0x2bee530) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/slave.cpp:347
#37 0x00007f9d034b092c in KIO::Slave::qt_metacall (this=0x2bee530, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa28d6b80) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4_build/kio/slave.moc:82
#38 0x00007f9d097aa21f in QMetaObject::activate (sender=0x2d2df30, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1d4ee28) at kernel/qobject.cpp:3272
#39 0x00007f9d033de0b7 in KIO::ConnectionPrivate::dequeue (this=0x317aa50) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kio/kio/connection.cpp:82
#40 0x00007f9d033de1dd in KIO::Connection::qt_metacall (this=0x2d2df30, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x2d74890) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4_build/kio/connection.moc:79
#41 0x00007f9d097a42ce in QObject::event (this=0x2d2df30, e=0x20) at kernel/qobject.cpp:1211
#42 0x00007f9d08b3a39c in QApplicationPrivate::notify_helper (this=0x16e4a80, receiver=0x2d2df30, e=0x2956bd0) at kernel/qapplication.cpp:4445
#43 0x00007f9d08b3f7dd in QApplication::notify (this=0x7fffa28d7630, receiver=0x2d2df30, e=0x2956bd0) at kernel/qapplication.cpp:4324
#44 0x00007f9d0adc3ea6 in KApplication::notify (this=0x7fffa28d7630, receiver=0x2d2df30, event=0x2956bd0) at /var/tmp/portage/kde-base/kdelibs-4.5.4/work/kdelibs-4.5.4/kdeui/kernel/kapplication.cpp:310
#45 0x00007f9d097925cb in QCoreApplication::notifyInternal (this=0x7fffa28d7630, receiver=0x2d2df30, event=0x2956bd0) at kernel/qcoreapplication.cpp:732
#46 0x00007f9d09795551 in sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x159a7e0) at kernel/qcoreapplication.h:215
#47 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x159a7e0) at kernel/qcoreapplication.cpp:1373
#48 0x00007f9d097beae3 in sendPostedEvents (s=0x16e7920) at kernel/qcoreapplication.h:220
#49 postEventSourceDispatch (s=0x16e7920) at kernel/qeventdispatcher_glib.cpp:277
#50 0x00007f9d020ca3c1 in g_main_dispatch (context=0x16e7840) at gmain.c:2149
#51 g_main_context_dispatch (context=0x16e7840) at gmain.c:2702
#52 0x00007f9d020ce2f8 in g_main_context_iterate (context=0x16e7840, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2780
#53 0x00007f9d020ce4ac in g_main_context_iteration (context=0x16e7840, may_block=1) at gmain.c:2843
#54 0x00007f9d097be623 in QEventDispatcherGlib::processEvents (this=0x16e0a00, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#55 0x00007f9d08beba0e in QGuiEventDispatcherGlib::processEvents (this=0x20, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#56 0x00007f9d09791322 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#57 0x00007f9d09791704 in QEventLoop::exec (this=0x7fffa28d75d0, flags=) at kernel/qeventloop.cpp:201
#58 0x00007f9d0979577b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#59 0x00000000004084d9 in main (argc=<value optimized out>, argv=0x7fffa28d9598) at /var/tmp/portage/media-sound/amarok-2.3.2-r1/work/amarok-2.3.2/src/main.cpp:237
Comment 10 Richard 2010-12-19 17:57:10 UTC
(In reply to comment #9)
> Backtrace from Comment #6 (please always paste backtraces inline, else those
> are not searchable). The backtrace in comment #8 is identical.
> 
> FYI: this is a totally different crash, related to a 3rd-party script you use
> and it needs to be reported to the script author asn we do not handle 3rd-party
>  bugs.

I did not install any third party scripts unless Gentoo's package manager bundled them. How do I find out what third party scripts are installed?
Comment 11 Myriam Schweingruber 2010-12-19 22:39:07 UTC
You can see the scripts in the $HOME/.kde/share/config/amarokrc file, and a list of all installed scripts in $HOME/.kde/share/apps/amarok/scripts/
Comment 12 Richard 2010-12-20 00:32:07 UTC
(In reply to comment #11)
> You can see the scripts in the $HOME/.kde/share/config/amarokrc file, and a
> list of all installed scripts in $HOME/.kde/share/apps/amarok/scripts/

The scripts directory does not exist. I looked in amarokrc and I found the following:

Amarok Script ConsoleEnabled=false
Cool StreamsEnabled=true
Librivox.orgEnabled=true
LyricWikiEnabled=true

Are these scripts distributed as part of Amarok?
Comment 13 Myriam Schweingruber 2010-12-20 03:29:36 UTC
These are the default scripts, so nothing wrong there.

Still, this backtrace is showing a totally different crash, in no relation to the initial bug report. Changing the subject line. Could you please give a step-by-step indication on how to reproduce this crash?
Comment 14 Richard 2010-12-20 03:40:58 UTC
(In reply to comment #13)
> These are the default scripts, so nothing wrong there.
> 
> Still, this backtrace is showing a totally different crash, in no relation to
> the initial bug report. Changing the subject line. Could you please give a
> step-by-step indication on how to reproduce this crash?

1. Rip a CD with KDE using FLAC encoding
2. Play the FLAC files in Amarok
3. Configure Amarok to use "Repeat Album".
4. Leave it running until it crashes.

That is how I have been encountering this crash. I like to leave classic music playing when I sleep at night, so I run Amarok until either I reboot my computer or something crashes.

By the way, I disabled Amarok's default scripts, so hopefully I will be able to report whether or not a crash occurs.
Comment 15 Richard 2010-12-20 21:56:50 UTC
I discovered today that my system had its processor's MTRR misconfigured, which had the effect of triggering race conditions in Nvidia's binary driver. Recompiling my kernel with MTRR cleanup support fixed the issues with Nvidia's binary driver and while it will take weeks before I can be certain, I think that the crashes in Amarok were caused by race conditions as well.

This seems to be a plausible explanation for them considering that they were inconsistent, some times producing back traces, many times not producing backtracks and some times not occurring at all. It also can explain why no one else seems to be able to reproduce this crash.

I will report back in a few weeks with whether or not any crashes have occurred, but anyone trying to debug the backtrace I posted should probably focus on finding a race condition in the code.
Comment 16 Myriam Schweingruber 2010-12-21 11:30:06 UTC
Thank you for the feedback, leaving as WAITINGFORINFO for now.
Comment 17 Richard 2010-12-21 20:00:18 UTC
(In reply to comment #16)
> Thank you for the feedback, leaving as WAITINGFORINFO for now.

I re-enabled scripting and ran Amarok. I just had a crash. It did not provide a backtrace, saying only the following:

Application: Amarok (amarok), signal: Segmentation fault
Comment 18 Myriam Schweingruber 2011-01-09 13:23:33 UTC
This is most likely solved in 2.4-git now, see also https://bugs.kde.org/show_bug.cgi?id=261839

*** This bug has been marked as a duplicate of bug 261839 ***