Bug 321216 - Files media source add unplayable file to list and amarok crash if the next song in the list is unplayable
Summary: Files media source add unplayable file to list and amarok crash if the next s...
Status: RESOLVED DUPLICATE of bug 290706
Alias: None
Product: phonon-backend-gstreamer
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.6.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 4.7
Assignee: Rohan Garg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 08:23 UTC by Wujun Zhou
Modified: 2014-08-10 11:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The whole backtrace (17.96 KB, text/plain)
2013-06-16 22:22 UTC, Wujun Zhou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wujun Zhou 2013-06-16 08:23:46 UTC
I think this contains two problems.
1. Unplayable file enter the playlist (using Files media source)
2. Amarok crash if next song in the list is unplayable

For the first one, the problem is the annoying apple "._xxx.mp4". (Created by apply to store resource fork)
Seems the Files media source think they are playable and add them. 

For the second one, seems like a upstream problem. The backtrace mentioned phone and gstream.

Reproducible: Always

Steps to Reproduce:
1. Create a dir with a normal mp3 and a ._.mp3(anything unplayable)
2. Use the "files" to add to the both of them into playlist
3. play the mp3 (skip to the end if needed)

The amarok will stop playing on the next song. At this time, click anything will crash the amarok.
Actual Results:  
amarok stop playing and crash

Expected Results:  
amarok skip the unplayable file, or better do not add that unplayable file in the first place.

I think it is a good idea to implement a general filter to exclude files based on regex. (Should be easy to implement)

And for my case, I think a special one that will filter any file starting with ._ is good enough.(I don't think people will name their files this way..) 


The following is a backtrace in my system. Sorry for the ??. I have not enable full backtrace on my system.
If you need a full backtrace, please let me know, and I will produce one. 

Finally, thanks for the effort to develop the amarok application. It is amazing and beautiful.
 

Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f110d90c780 (LWP 14638))]
...
Thread 1 (Thread 0x7f110d90c780 (LWP 14638)):
[KCrash Handler]
#5  0x00007f10fd1eef31 in g_value_set_object () from /usr/lib64/libgobject-2.0.so.0
#6  0x00007f10f4c762d8 in ?? () from /usr/lib64/gstreamer-0.10/libgstplaybin.so
#7  0x00007f10fd1ed0ce in g_object_get_valist () from /usr/lib64/libgobject-2.0.so.0
#8  0x00007f10fd1ed527 in g_object_get () from /usr/lib64/libgobject-2.0.so.0
#9  0x00007f10f6826adb in ?? () from /usr/lib64/kde4/plugins/phonon_backend/phonon_gstreamer.so
#10 0x00007f10fd1e5482 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#11 0x00007f10fd1f64d1 in ?? () from /usr/lib64/libgobject-2.0.so.0
#12 0x00007f10fd1fe772 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#13 0x00007f10fd1fe912 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#14 0x00007f10fd1ea0e7 in ?? () from /usr/lib64/libgobject-2.0.so.0
#15 0x00007f10fd44ddb4 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#16 0x00007f10fd1eb9c3 in g_object_notify () from /usr/lib64/libgobject-2.0.so.0
#17 0x00007f10f4c7289f in ?? () from /usr/lib64/gstreamer-0.10/libgstplaybin.so
#18 0x00007f10fd1e5482 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#19 0x00007f10fd1f64d1 in ?? () from /usr/lib64/libgobject-2.0.so.0
#20 0x00007f10fd1fe772 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#21 0x00007f10fd1fe912 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#22 0x00007f10fd1ea0e7 in ?? () from /usr/lib64/libgobject-2.0.so.0
#23 0x00007f10fd44ddb4 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#24 0x00007f10fd1eb9c3 in g_object_notify () from /usr/lib64/libgobject-2.0.so.0
#25 0x00007f10cc4f52d3 in ?? () from /usr/lib64/gstreamer-0.10/libgstdecodebin2.so
#26 0x00007f10fd46700c in gst_element_change_state () from /usr/lib64/libgstreamer-0.10.so.0
#27 0x00007f10fd467958 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#28 0x00007f10fd4552b7 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#29 0x00007f10fd484f85 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#30 0x00007f10f4c74871 in ?? () from /usr/lib64/gstreamer-0.10/libgstplaybin.so
#31 0x00007f10fd46700c in gst_element_change_state () from /usr/lib64/libgstreamer-0.10.so.0
#32 0x00007f10fd467958 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#33 0x00007f10f6824fc6 in ?? () from /usr/lib64/kde4/plugins/phonon_backend/phonon_gstreamer.so
#34 0x00007f10f681d102 in ?? () from /usr/lib64/kde4/plugins/phonon_backend/phonon_gstreamer.so
#35 0x00007f10f681d3d4 in ?? () from /usr/lib64/kde4/plugins/phonon_backend/phonon_gstreamer.so
#36 0x00007f110c8d607b in EngineController::playUrl(KUrl const&, unsigned int) () from /usr/lib64/libamaroklib.so.1
#37 0x00007f110c8d76bc in EngineController::play(KSharedPtr<Meta::Track>, unsigned int) () from /usr/lib64/libamaroklib.so.1
#38 0x00007f110c55ceef in Playlist::Actions::play(unsigned long long, bool) () from /usr/lib64/libamaroklib.so.1
#39 0x00007f110c55d53f in Playlist::Actions::play(QModelIndex const&) () from /usr/lib64/libamaroklib.so.1
#40 0x00007f110c5f06e1 in ?? () from /usr/lib64/libamaroklib.so.1
#41 0x00007f110c5f5e0e in ?? () from /usr/lib64/libamaroklib.so.1
#42 0x00007f110ab29994 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#43 0x00007f110ba0a135 in QAbstractItemView::doubleClicked(QModelIndex const&) () from /usr/lib64/qt4/libQtGui.so.4
#44 0x00007f110ba13795 in QAbstractItemView::mouseDoubleClickEvent(QMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#45 0x00007f110b570a5a in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#46 0x00007f110b8fe176 in QFrame::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#47 0x00007f110ba1473b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#48 0x00007f110ab15824 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#49 0x00007f110b5236ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#50 0x00007f110b5268e9 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#51 0x00007f110d3168b6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#52 0x00007f110ab156be in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#53 0x00007f110b5297cb in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#54 0x00007f110b59c814 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#55 0x00007f110b59b111 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#56 0x00007f110b5c3fda in ?? () from /usr/lib64/qt4/libQtGui.so.4
#57 0x00007f1104e406f3 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#58 0x00007f1104e40a40 in ?? () from /usr/lib64/libglib-2.0.so.0
#59 0x00007f1104e40b04 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#60 0x00007f110ab438c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#61 0x00007f110b5c40ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#62 0x00007f110ab143ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#63 0x00007f110ab14688 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#64 0x00007f110ab19858 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#65 0x000000000040954a in ?? ()
#66 0x00007f110a0f860d in __libc_start_main () from /lib64/libc.so.6
#67 0x000000000040c01d in _start ()
Comment 1 Myriam Schweingruber 2013-06-16 09:19:18 UTC
Please install debugging symbols for the phonon-backend-gstreamer, this is not a problem with Amarok, but with that backend.
Comment 2 Wujun Zhou 2013-06-16 22:22:31 UTC
Created attachment 80566 [details]
The whole backtrace
Comment 3 Wujun Zhou 2013-06-16 22:39:19 UTC
Yes. I know the crash problem is more likely a upstream problem and I will file bug report to them once I find more info. (I don't want to file something like "crash unknown reason"). I suspect the problem may be related to crossfade, because play the unplayable file is fine. 


But the first one, "Unplayable file enter the playlist (using Files media source)", may be a bug of amarok. (That's why I choose the bug component to "File Browser") 

I find that the "Files" media source can ignore 0 size file, but not anything else. For my case, I have some ._xxx.m4a created by another Apple computer. (My collection is on a NFS and shard by my Linux and my wife's Apple. The apple will create these ._abc.mp3 for each abc.mp3)

When I use "replace the playlist" of "Files", it adds these unplayable ._xxx.m4a into my playlist. Which makes my list not very usable. (Playback will stop on these unplayable files even upstream fix the crash problem)

Thus, I hope the amarok can fix this by implementing a general filter to exclude files based on regex, or just filtering files starting with ._, as I have mentioned.
 

PS: additional info on the "Steps to Reproduce": The created ._XX.mp3 must have non-zero size. 

I also fine some additional info on the terminal:

(amarok:14322): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
KCrash: Application 'amarok' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/wujun/.kde4/socket-g/kdeinit4__0

I also reproduce a backtrace with missing symbol fixed. I think the related is following: (The attachment is the whole backtrace in case I'm wrong)

Thread 1 (Thread 0x7f2192861780 (LWP 1186)):
[KCrash Handler]
#5  g_value_set_object (value=0x7fff08d53990, v_object=0xffffffff) at gobject.c:3411
#6  0x00007f2179bd12d8 in gst_play_bin_get_property (object=0x11ba1b0, prop_id=<optimized out>, value=0x7fff08d53990, pspec=<optimized out>) at gstplaybin2.c:2018
#7  0x00007f2182147cae in object_get_property (value=0x7fff08d53990, pspec=<optimized out>, object=0x11ba1b0) at gobject.c:1289
#8  g_object_get_valist (object=object@entry=0x11ba1b0, first_property_name=first_property_name@entry=0x7f217b78c86d "source", var_args=var_args@entry=0x7fff08d53a38) at gobject.c:2014
#9  0x00007f2182148127 in g_object_get (_object=0x11ba1b0, first_property_name=0x7f217b78c86d "source") at gobject.c:2104
#10 0x00007f217b781adb in Phonon::Gstreamer::Pipeline::cb_setupSource (playbin=<optimized out>, param=<optimized out>, data=0x1199410) at /var/tmp/portage/media-libs/phonon-gstreamer-4.6.3/work/phonon-backend-gstreamer-4.6.3/gstreamer/pipeline.cpp:828
#11 0x00007f2182140510 in g_closure_invoke (closure=0x11bd8c0, return_value=0x0, n_param_values=2, param_values=0x7fff08d53e20, invocation_hint=0x7fff08d53dc0) at gclosure.c:777
#12 0x00007f2182150f20 in signal_emit_unlocked_R (node=node@entry=0xdfd1f0, detail=detail@entry=1817, instance=instance@entry=0x11ba1b0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff08d53e20) at gsignal.c:3551
#13 0x00007f2182158b4a in g_signal_emit_valist (instance=0x11ba1b0, signal_id=<optimized out>, detail=1817, var_args=var_args@entry=0x7fff08d54078) at gsignal.c:3300
#14 0x00007f2182158d0a in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3356
#15 0x00007f2182144d51 in g_object_dispatch_properties_changed (object=0x11ba1b0, n_pspecs=2, pspecs=0x0) at gobject.c:1041
#16 0x00007f21823a7db4 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#17 0x00007f21821465fb in g_object_notify_by_spec_internal (pspec=0x11b6280, object=0x11ba1b0) at gobject.c:1133
#18 g_object_notify (object=object@entry=0x11ba1b0, property_name=property_name@entry=0x7f2179bf4b2b "source") at gobject.c:1175
#19 0x00007f2179bcd89f in notify_source_cb (uridecodebin=<optimized out>, pspec=<optimized out>, group=<optimized out>) at gstplaybin2.c:3445
#20 0x00007f2182140510 in g_closure_invoke (closure=0x7f20b80187c0, return_value=0x0, n_param_values=2, param_values=0x7fff08d54420, invocation_hint=0x7fff08d543c0) at gclosure.c:777
#21 0x00007f2182150f20 in signal_emit_unlocked_R (node=node@entry=0xdfd1f0, detail=detail@entry=1817, instance=instance@entry=0x2fba930, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff08d54420) at gsignal.c:3551
#22 0x00007f2182158b4a in g_signal_emit_valist (instance=0x2fba930, signal_id=<optimized out>, detail=1817, var_args=var_args@entry=0x7fff08d54678) at gsignal.c:3300
#23 0x00007f2182158d0a in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3356
#24 0x00007f2182144d51 in g_object_dispatch_properties_changed (object=0x2fba930, n_pspecs=2, pspecs=0x0) at gobject.c:1041
#25 0x00007f21823a7db4 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#26 0x00007f21821465fb in g_object_notify_by_spec_internal (pspec=0x11b7720, object=0x2fba930) at gobject.c:1133
#27 g_object_notify (object=object@entry=0x2fba930, property_name=property_name@entry=0x7f20c7ffe549 "source") at gobject.c:1175
#28 0x00007f20c7ffa2d3 in setup_source (decoder=0x2fba930) at gsturidecodebin.c:2015
#29 gst_uri_decode_bin_change_state (element=0x2fba930, transition=<optimized out>) at gsturidecodebin.c:2493
#30 0x00007f21823c100c in gst_element_change_state () from /usr/lib64/libgstreamer-0.10.so.0
#31 0x00007f21823c1958 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#32 0x00007f21823af2b7 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#33 0x00007f21823def85 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#34 0x00007f2179bcf871 in gst_play_bin_change_state (element=0x11ba1b0, transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstplaybin2.c:3936
#35 0x00007f21823c100c in gst_element_change_state () from /usr/lib64/libgstreamer-0.10.so.0
#36 0x00007f21823c1958 in ?? () from /usr/lib64/libgstreamer-0.10.so.0
#37 0x00007f217b77ffc6 in Phonon::Gstreamer::Pipeline::setState (this=0x1199410, state=GST_STATE_PLAYING) at /var/tmp/portage/media-libs/phonon-gstreamer-4.6.3/work/phonon-backend-gstreamer-4.6.3/gstreamer/pipeline.cpp:242
#38 0x00007f217b778102 in Phonon::Gstreamer::MediaObject::requestState (this=this@entry=0xf90940, state=state@entry=Phonon::PlayingState) at /var/tmp/portage/media-libs/phonon-gstreamer-4.6.3/work/phonon-backend-gstreamer-4.6.3/gstreamer/mediaobject.cpp:828
#39 0x00007f217b7783d4 in Phonon::Gstreamer::MediaObject::play (this=0xf90940) at /var/tmp/portage/media-libs/phonon-gstreamer-4.6.3/work/phonon-backend-gstreamer-4.6.3/gstreamer/mediaobject.cpp:234
#40 0x00007f219182b07b in EngineController::playUrl(KUrl const&, unsigned int) () from /usr/lib64/libamaroklib.so.1
#41 0x00007f219182c6bc in EngineController::play(KSharedPtr<Meta::Track>, unsigned int) () from /usr/lib64/libamaroklib.so.1
#42 0x00007f21914b1eef in Playlist::Actions::play(unsigned long long, bool) () from /usr/lib64/libamaroklib.so.1
#43 0x00007f21914b253f in Playlist::Actions::play(QModelIndex const&) () from /usr/lib64/libamaroklib.so.1
Comment 4 Myriam Schweingruber 2014-08-10 11:03:43 UTC
We would need a backtrace with the latest Phonon-backend-gstreamer 4.7.2 or later

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