GNOME Bugzilla – Bug 618987
[playbin2] segfault after <playsink0> can't find a sink pad on custom text sink
Last modified: 2010-09-09 01:43:59 UTC
this excerpt of code ..... m_gst_subtitlebin = gst_bin_new("subtitle_bin"); GstElement *appsink = gst_element_factory_make("appsink", "subtitle_sink"); if (!appsink) eDebug("eServiceMP3::sorry, can't play: missing gst-plugin-appsink"); GstElement *dvdsubdec = gst_element_factory_make("dvdsubdec", "vobsubtitle_decoder"); if ( !dvdsubdec ) eDebug("eServiceMP3::sorry, can't play: missing gst-plugin-dvdsub"); gst_bin_add_many(GST_BIN(m_gst_subtitlebin), dvdsubdec, appsink, NULL); GstPad *ghostpad = gst_ghost_pad_new_no_target("ghost_sink", GST_PAD_SINK); //! gst_element_add_pad (m_gst_subtitlebin, ghostpad); // with this line missing eDebug("gstCBsubtitleCAPS:: dvdsubdec=%p, appsink=%p, ghostpad=%p,", dvdsubdec, appsink, ghostpad); g_signal_connect (ghostpad, "notify::caps", G_CALLBACK (gstCBsubtitleCAPS), this); GstCaps* caps = gst_caps_from_string("text/plain; text/x-pango-markup; video/x-dvd-subpicture; video/x-raw-rgb"); g_object_set (G_OBJECT (appsink), "caps", caps, NULL); gst_caps_unref(caps); g_object_set (G_OBJECT (m_gst_playbin), "text-sink", m_gst_subtitlebin, NULL); m_subs_to_pull_handler_id = g_signal_connect (appsink, "new-buffer", G_CALLBACK (gstCBsubtitleAvail), this); .... leads to a crash 0:00:26.172806000 1906 0x14e7b60 INFO GST_ELEMENT_FACTORY gstelementfactory.c:401:gst_element_factory_create: creating element "bin" named "tbin" 0:00:26.173060000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2238:gst_element_continue_state:<subtitle_sink> completed state change to READY 0:00:26.173503000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2251:gst_element_continue_state:<subtitle_sink> posting state-changed NULL to READY 0:00:26.174130000 1906 0x14e7b60 INFO GST_STATES gstbin.c:2425:gst_bin_change_state_func:<subtitle_bin> child 'subtitle_sink' changed state to 2(READY) successfully 0:00:26.174615000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2238:gst_element_continue_state:<vobsubtitle_decoder> completed state change to READY 0:00:26.175046000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2251:gst_element_continue_state:<vobsubtitle_decoder> posting state-changed NULL to READY 0:00:26.175621000 1906 0x14e7b60 INFO GST_STATES gstbin.c:2425:gst_bin_change_state_func:<subtitle_bin> child 'vobsubtitle_decoder' changed state to 2(READY) successfully 0:00:26.176390000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2238:gst_element_continue_state:<subtitle_bin> completed state change to READY 0:00:26.176900000 1906 0x14e7b60 INFO GST_STATES gstelement.c:2251:gst_element_continue_state:<subtitle_bin> posting state-changed NULL to READY 0:00:26.179441000 1906 0x14e7b60 INFO playsink gstplaysink.c:828:find_property:<subtitle_sink> found async with sink property 0:00:26.179527000 1906 0x5b4b10 DEBUG playbin2 gstplaybin2.c:2001:gst_play_bin_update_cached_duration_from_query:<playbin> Updating cached duration from query 0:00:26.181324000 1906 0x14e7b60 INFO GST_ELEMENT_PADS gstelement.c:970:gst_element_get_static_pad: no such pad 'sink' in element "subtitle_bin" 0:00:26.182087000 1906 0x14e7b60 WARN playsink gstplaysink.c:1214:gen_text_chain:<playsink0> can't find a sink pad on custom text sink PC: 2d3b4214 00000000 10008700 2d3b0000 00000002 00000000 2d3dc218 00000014 00000014 00000001 00000000 2b1938f4 014cfff8 00000000 00000048 00000001 00000001 00000000 2d3dc218 00000014 2d3e0000 013bf6c0 2d3dc1ec 2d3e0000 0000078b 00000000 2af13584 00000001 00000000 2d3fa6a0 2dfe55e8 00000000 2d3b45e0 As a final action, i will try to dump a bit of code. I just hope that this won't crash. 2d3b4214: 00 00 84 8c 21 88 c0 00 09 f8 20 03 21 90 a0 00 28 00 bc 8f 18 00 40 14 21 98 40 00 cc 85 84 8f (end)
the crash happened because the sink was named "ghost-sink" instead of "sink".
What's the backtrace of the crash?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!