After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667571 - [0.11] [playbin] Crashes and warnings when using suburi property
[0.11] [playbin] Crashes and warnings when using suburi property
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other Linux
: Normal blocker
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 668682
 
 
Reported: 2012-01-09 15:24 UTC by Sebastian Dröge (slomo)
Modified: 2012-01-27 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
typefind: answer caps queries with our typefound caps (1.36 KB, patch)
2012-01-25 12:38 UTC, Vincent Penquerc'h
committed Details | Review

Description Sebastian Dröge (slomo) 2012-01-09 15:24:21 UTC
When taking these two files:
http://samples.mplayerhq.hu/sub/thief.avi http://samples.mplayerhq.hu/sub/thief.sub


GStreamer-CRITICAL **: gst_caps_get_structure: assertion `index < GST_CAPS_LEN (caps)' failed
aborting...


Thread 140737289619200 (LWP 9624)

  • #0 __strcmp_sse42
    at ../sysdeps/x86_64/multiarch/strcmp.S line 259
  • #1 array_has_value
    at gstplaybin2.c line 2492
  • #2 pad_added_cb
    at gstplaybin2.c line 2570
  • #3 g_closure_invoke
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #4 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3252
  • #5 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 2983
  • #6 g_signal_emit
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #7 gst_element_add_pad
    at gstelement.c line 691
  • #8 g_closure_invoke
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #9 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3252
  • #10 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 2983
  • #11 g_signal_emit
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #12 gst_element_add_pad
    at gstelement.c line 691
  • #13 gst_decode_bin_expose
    at gstdecodebin2.c line 3630
  • #14 source_pad_blocked_cb
    at gstdecodebin2.c line 3762
  • #15 probe_hook_marshal
  • #16 g_hook_list_marshal
    at /tmp/buildd/glib2.0-2.28.6/./glib/ghook.c line 387
  • #17 do_probe_callbacks
    at gstpad.c line 2942
  • #18 gst_pad_push_event_unchecked
    at gstpad.c line 4040
  • #19 gst_pad_push_event
    at gstpad.c line 4175
  • #20 gst_type_find_element_sink_event
    at gsttypefindelement.c line 577
  • #21 gst_pad_send_event_unchecked
    at gstpad.c line 4329
  • #22 gst_pad_push_event_unchecked
    at gstpad.c line 4061
  • #23 gst_pad_push_event
    at gstpad.c line 4175
  • #24 gst_pad_send_event_unchecked
  • #25 gst_pad_push_event_unchecked
    at gstpad.c line 4061
  • #26 gst_pad_push_event
    at gstpad.c line 4175
  • #27 gst_base_src_loop
    at gstbasesrc.c line 2502
  • #28 gst_task_func
    at gsttask.c line 322
  • #29 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.28.6/./glib/gthreadpool.c line 319
  • #30 g_thread_create_proxy
    at /tmp/buildd/glib2.0-2.28.6/./glib/gthread.c line 1897
  • #31 start_thread
    at pthread_create.c line 304
  • #32 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #33 ??

Comment 1 Sebastian Dröge (slomo) 2012-01-09 15:26:42 UTC
(gst-launch-0.11:9608): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `index < GST_CAPS_LEN (caps)' failed

(gst-launch-0.11:9608): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed

Program received signal SIGSEGV, Segmentation fault.

Thread 140737289619200 (LWP 9624)

  • #0 __strcmp_sse42
    at ../sysdeps/x86_64/multiarch/strcmp.S line 259
  • #1 array_has_value
    at gstplaybin2.c line 2492
  • #2 pad_added_cb
    at gstplaybin2.c line 2570
  • #3 g_closure_invoke
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #4 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3252
  • #5 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 2983
  • #6 g_signal_emit
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #7 gst_element_add_pad
    at gstelement.c line 691
  • #8 g_closure_invoke
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #9 signal_emit_unlocked_R
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3252
  • #10 g_signal_emit_valist
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 2983
  • #11 g_signal_emit
    at /tmp/buildd/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #12 gst_element_add_pad
    at gstelement.c line 691
  • #13 gst_decode_bin_expose
    at gstdecodebin2.c line 3630
  • #14 source_pad_blocked_cb
    at gstdecodebin2.c line 3762
  • #15 probe_hook_marshal
  • #16 g_hook_list_marshal
    at /tmp/buildd/glib2.0-2.28.6/./glib/ghook.c line 387
  • #17 do_probe_callbacks
    at gstpad.c line 2942
  • #18 gst_pad_push_event_unchecked
    at gstpad.c line 4040
  • #19 gst_pad_push_event
    at gstpad.c line 4175
  • #20 gst_type_find_element_sink_event
    at gsttypefindelement.c line 577
  • #21 gst_pad_send_event_unchecked
    at gstpad.c line 4329
  • #22 gst_pad_push_event_unchecked
    at gstpad.c line 4061
  • #23 gst_pad_push_event
    at gstpad.c line 4175
  • #24 gst_pad_send_event_unchecked
  • #25 gst_pad_push_event_unchecked
    at gstpad.c line 4061
  • #26 gst_pad_push_event
    at gstpad.c line 4175
  • #27 gst_base_src_loop
    at gstbasesrc.c line 2502
  • #28 gst_task_func
    at gsttask.c line 322
  • #29 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.28.6/./glib/gthreadpool.c line 319
  • #30 g_thread_create_proxy
    at /tmp/buildd/glib2.0-2.28.6/./glib/gthread.c line 1897
  • #31 start_thread
    at pthread_create.c line 304
  • #32 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #33 ??

Comment 2 Vincent Penquerc'h 2012-01-25 11:42:33 UTC
Eventually tracked down, but not yet fixed:

- subparse typefinds correctly, and set caps on its src pad before it is linked
- setting caps in 0.11 sends a caps event, changed from 0.10
- the caps event is sticky, so it kept for later pushing
- delayed sticky events are send when a buffer is next pushed
- playbin2 tries to get caps from downstream before a buffer is pushed
- downstream has not heard of any caps yet, so ends up using ANY
- ANY caps don't have structures, so getting the first one asserts

I'm not sure where to flip a bit to cause this to fall into place again.
I tried to send delayed sticky events after linking pads, but that's too early.
subparse does not receive any event/query where it could react.
I'll go on looking, but if the above triggers someone's eureka moment, let me know :)
Comment 3 Vincent Penquerc'h 2012-01-25 12:38:00 UTC
Created attachment 206087 [details] [review]
typefind: answer caps queries with our typefound caps

This avoids merely forwarding the event to the sink, and getting
something useless such as ANY.
Comment 4 Vincent Penquerc'h 2012-01-25 12:41:46 UTC
This fixes ANY caps reaching playbin2, we now get the appropriate subtitle caps.
However, while this fixes the criticals here, this does not fix playback of the sample, as we hit:

error: Can't play a text file without video or visualizations.

Which is odd since there is a video (I can't play the sample above due to lack of working plugin, but it also happens for an Ogg video which plays fine without "suburi=...").

I'm not sure yet whether it's a linked bug, or another one altogether, so I'll keep this bug open for continuing investigating the does-not-play issue.
Comment 5 Vincent Penquerc'h 2012-01-25 17:58:09 UTC
Other bugs seem unrelated to this patch, so I've open a clone for the rest, and I'm moving this to core, where the criticals patch is.
Comment 6 Vincent Penquerc'h 2012-01-26 15:00:09 UTC
This patch causes a simple gst-launch-0.11 playbin uri=file:///tmp/sample.mp3 pipeline to fail to go to PLAYING.
Comment 7 Vincent Penquerc'h 2012-01-26 15:18:07 UTC
On deeper inspection, this patch actually fixes a bug (MP3 source being ANY, and failing to autoplug anything), and goes further, where there is a hang.
So the patch is alright, and the failure is unrelated, even if only visible with this patch in.
Comment 8 Sebastian Dröge (slomo) 2012-01-27 15:46:15 UTC
What's missing here now?
Comment 9 Vincent Penquerc'h 2012-01-27 16:00:13 UTC
For the crashing/asserting, nothing. I just wasn't certain the patch was the correct way of addressing the issue, or just papering over the cracks, so did not close it yet.

Now, the movie+subs playback doesn't actually work yet (see https://bugzilla.gnome.org/show_bug.cgi?id=668682), and I've left it alone for now as I wasn't doing much progress anymore. It's currently at "textoverlay plugged alright, but does not preroll".

So this bug can be closed, and I'll go back to 668682 next week.