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 148332 - link renegotiation problem [regression]
link renegotiation problem [regression]
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-24 09:56 UTC by Tim-Philipp Müller
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2004-07-24 09:56:06 UTC
Hi folks, 
 
I've got a pipeline like this: 
 
 x---------------------------------------- ScAudioPlay thread -----------x 
 |                                                                       | 
 |                                                                       | 
 | x--------- ScAudioDecode thread -----------x                          | 
 | | src ! spider ! audioconvert ! audioscale | ! queue ! vol ! audiosink| 
 | x------------------------------------------x                          | 
 |                                                                       | 
 x-----------------------------------------------------------------------x 
 
The ScAudioDecode part is re-created for every new song to be played. 
 
This worked fine with all previous 0.8.x versions, but now suddenly I get this 
when changing songs (as far as I can see when changing from an .ogg to 
an .mp3, but there might be other cases as well): 
 
Playing: /mnt/media/music-tautologist/03 - Leonard Cohen - First We Take 
Manhattan.mp3 [Playing category: All Songs] 
sc-audio-play.c:1420 
 
GStreamer-CRITICAL **: file gstcaps.c: line 203 (gst_caps_copy): assertion 
`GST_IS_CAPS (caps)' failed 
aborting... 
 
Program received signal SIGABRT, Aborted. 
[Switching to Thread 1086356032 (LWP 3699)] 
0x40853f19 in raise () from /lib/tls/libc.so.6 
(gdb) bt 
  • #0 raise
    from /lib/tls/libc.so.6
  • #1 abort
    from /lib/tls/libc.so.6
  • #2 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #3 g_log
    from /usr/lib/libglib-2.0.so.0
  • #4 gst_caps_copy
    at gstcaps.c line 203
  • #5 gst_queue_getcaps
    at gstqueue.c line 356
  • #6 gst_pad_get_caps
    at gstpad.c line 2634
  • #7 gst_pad_renegotiate
    at gstpad.c line 1450
  • #8 gst_element_negotiate_pads
    at gstelement.c line 2881
  • #9 gst_element_change_state
    at gstelement.c line 2989
  • #10 gst_queue_change_state
    at gstqueue.c line 960
  • #11 gst_element_set_state_func
    at gstelement.c line 2789
  • #12 gst_element_set_state
    at gstelement.c line 2735
  • #13 set_kid_state_func
    at gstbin.c line 818
  • #14 gst_bin_foreach
    at gstbin.c line 781
  • #15 gst_bin_set_state
    at gstbin.c line 856
  • #16 gst_thread_set_state
    at gstthread.c line 432
  • #17 gst_element_set_state
    at gstelement.c line 2735
  • #18 sc_audio_play_play
    at sc-audio-play.c line 1422
  • #19 app_window_play_item
    at sc-app-window.c line 785
 
-------------------- 
 
sometimes the warnings look like this: 
 
(scentric:2802): GStreamer-CRITICAL **: file gstcaps.c: line 203 
(gst_caps_copy): assertion `GST_IS_CAPS (caps)' failed 
 
(scentric:2802): GStreamer-CRITICAL **: pad queue:sink returned NULL caps from 
getcaps function 
 
 
(scentric:2802): GStreamer-CRITICAL **: file gstcaps.c: line 699 
(gst_caps_is_equal): assertion `caps2 != NULL' failed 
 
 
Cheers 
 -Tim
Comment 1 Tim-Philipp Müller 2004-07-24 23:57:55 UTC
Erm, silly me, the full set of warnings always looks like quoted at the end, 
but of course it stops after the first warning when run with 
--g-fatal-warnings ... 
 
Let me know if you need more information or a full debug log. 
 
Cheers 
 -Tim 
 
Comment 2 Benjamin Otte (Company) 2004-07-25 14:17:42 UTC
Could you try to reproduce this somehow with replugging in a 
{ { fakesrc ! identity } ! queue ! fakesink }
or similar pipeline, so we can 
a) easily reproduce this
b) add this to the testsuite

I think there's some proper locking missing in the _getcaps and _link functions,
but it's a bit hard to fix by guessing.
Comment 3 Tim-Philipp Müller 2004-07-25 21:37:34 UTC
Looks like this commit fixed the main problem: 
 
2004-07-25  Benjamin Otte  <otte@gnome.org> 
 
        * gst/autoplug/gstspideridentity.c: (gst_spider_identity_link): 
          don't delay links on the sink elements, it causes unnegotiated 
          links. 
        * gst/elements/gsttypefindelement.c: 
        (gst_type_find_element_base_init): 
          add our padtemplates, we indeed do have some. 
        * gst/elements/gsttypefindelement.c: 
        (gst_type_find_element_handle_event), 
        (gst_type_find_element_chain): 
          don't push data when typefinding failed. 
        * gst/gstpad.c: (gst_pad_link_fixate): 
          check that no fixate function returns empty caps. 
        * gst/gstpad.c: (gst_pad_push): 
          check that the link is negotiated before data gets pushed. 
        * tools/gst-register.c: (main): 
          don't assert (fixes #148283) 
 
 
I still get a 
 
  GStreamer-Warning **: pushing data on non-negotiated pad audioscale:src, not 
allowed 
 
when re-linking (stack trace below), but things seem to work again anyway.  
 
I don't have time to write a test case at the moment, sorry. Still moving home 
etc.  
 
Cheers 
 -Tim 
 
-------------- 
 
Stack trace from the above warning: 
 
Playing: foo.mp3 
 
GStreamer-WARNING **: pushing data on non-negotiated pad audioscale:src, not 
allowed. 
aborting... 
 
Program received signal SIGABRT, Aborted. 
[Switching to Thread 1102605232 (LWP 28642)] 
0x40853f19 in raise () from /lib/tls/libc.so.6 
(gdb) bt 
  • #0 raise
    from /lib/tls/libc.so.6
  • #1 abort
    from /lib/tls/libc.so.6
  • #2 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #3 g_log
    from /usr/lib/libglib-2.0.so.0
  • #4 gst_pad_push
    at gstpad.c line 3185
  • #5 gst_audioscale_chain
    at gstaudioscale.c line 424
  • #6 gst_pad_call_chain_function
    at gstpad.c line 4398
  • #7 gst_pad_push
    at gstpad.c line 3213
  • #8 gst_audio_convert_chain
    at gstaudioconvert.c line 283
  • #9 gst_pad_call_chain_function
    at gstpad.c line 4398
  • #10 gst_pad_push
    at gstpad.c line 3213
  • #11 gst_spider_identity_chain
    at gstspideridentity.c line 222
  • #12 gst_spider_identity_dumb_loop
    at gstspideridentity.c line 446
  • #13 loop_group_schedule_function
    at gstoptimalscheduler.c line 1344
  • #14 schedule_group
    at gstoptimalscheduler.c line 1170
  • #15 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1217
  • #16 schedule_chain
    at gstoptimalscheduler.c line 1270
  • #17 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2603
  • #18 gst_scheduler_iterate
    at gstscheduler.c line 705
  • #19 gst_bin_iterate_func
    at gstbin.c line 1152
  • #20 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 472
  • #21 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #24 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #25 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #26 gst_bin_iterate
    at gstbin.c line 1205
  • #27 gst_thread_main_loop
    at gstthread.c line 590
  • #28 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #29 start_thread
    from /lib/tls/libpthread.so.0
  • #30 ??
 
Comment 4 Tim-Philipp Müller 2004-07-28 18:49:29 UTC
This seems to be fully fixed now => closing bug. Thanks for the quick fix. 
 
Cheers  
 -Tim