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 399613 - playbin: sink caps on vis-plugin not getting set (occasional segfault on AAC files)
playbin: sink caps on vis-plugin not getting set (occasional segfault on AAC ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.2
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-23 00:28 UTC by Ed Catmur
Modified: 2007-01-24 21:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Ed Catmur 2007-01-23 00:28:28 UTC
Occasionally when playing AACs, Rhythmbox segvs when I load the Goom visualisation:

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 325)

  • #0 gst_goom_chain
    at gstgoom.c line 492
  • #1 gst_pad_chain_unchecked
    at gstpad.c line 3412
  • #2 gst_pad_push
    at gstpad.c line 3578
  • #3 gst_proxy_pad_do_chain
    at gstghostpad.c line 189
  • #4 gst_pad_chain_unchecked
    at gstpad.c line 3412
  • #5 gst_pad_push
    at gstpad.c line 3578
  • #6 gst_base_transform_chain
    at gstbasetransform.c line 1548
  • #7 gst_pad_chain_unchecked
    at gstpad.c line 3412
  • #8 gst_pad_push
    at gstpad.c line 3578
  • #9 gst_queue_loop
    at gstqueue.c line 786
  • #10 gst_task_func
    at gsttask.c line 192
  • #11 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #12 g_thread_create_proxy
    at gthread.c line 591
  • #13 start_thread
    at pthread_create.c line 296
  • #14 clone
    from /lib/libc.so.6
$10 = 0
(gdb) p *goom
$11 = {element = {object = {object = {g_type_instance = {g_class = 0x8feae08}, 
        ref_count = 2, qdata = 0x0}, refcount = 0, lock = 0x902ada8, 
      name = 0x90ad860 "goom3", name_prefix = 0x0, parent = 0x908e2e0, 
      flags = 0, _gst_reserved = 0x0}, state_lock = 0x8b7e1d0, 
    state_cond = 0x9324c28, state_cookie = 3, 
    current_state = GST_STATE_PLAYING, next_state = GST_STATE_VOID_PENDING, 
    pending_state = GST_STATE_VOID_PENDING, 
    last_return = GST_STATE_CHANGE_SUCCESS, bus = 0x89560b0, 
    clock = 0x8b9c168, base_time = 0, numpads = 2, pads = 0xb3c80400, 
    numsrcpads = 1, srcpads = 0x8b83bc0, numsinkpads = 1, 
    sinkpads = 0x8e84cd0, pads_cookie = 2, _gst_reserved = {0x0, 0x0, 0x0, 
      0x0}}, sinkpad = 0x90b1d90, srcpad = 0x9051488, adapter = 0x8ff8020, 
  rate = 0, channels = 0, bps = 0, fps_n = 20, fps_d = 1, width = 320, 
  height = 240, duration = 50000000, outsize = 307200, spf = 0, datain = {{
      0 <repeats 512 times>}, {0 <repeats 512 times>}}, goomdata = {
    pixel = 0xb4c00018, back = 0xb4c4b0a0, p1 = 0xb4c00080, p2 = 0xb4c4b100, 
    cycle = 0, resolx = 320, resoly = 240, buffsize = 76800, lockvar = 0, 
    goomvar = 0, totalgoom = 0, agoom = 0, loopvar = 0, speedvar = 0, 
    lineMode = 0, goomlimit = 2 '\002', zfd = 0x8956c38, rand_tab = 0x9656f80, 
    rand_pos = 65536}, segment = {rate = 1, abs_rate = 1, 
    format = GST_FORMAT_TIME, flags = GST_SEEK_FLAG_NONE, start = 0, 
    stop = -1, time = 0, accum = 0, last_stop = 0, duration = -1, 
    applied_rate = 1, _gst_reserved = "\000\000\000\000\000\000\000"}, 
---Type <return> to continue, or q <return> to quit---
  next_ts = 40031201814, proportion = 1, earliest_time = 18446744073709551615}

Evidently in gst_goom_sink_setcaps() gst_structure_get_int() returned 0 for channels and rate.  Goom should refuse to set caps if this happens.
Comment 1 Ed Catmur 2007-01-23 01:19:06 UTC
OK, that's an incorrect analysis; gst_goom_sink_setcaps() isn't getting run at all.  Is this a playbin bug (in gst_play_bin_vis_blocked) or is rhythmbox doing something screwy?  My money's on the former.
Comment 2 Ed Catmur 2007-01-23 01:37:27 UTC
Yep, this is also triggered changing visualisation in Totem, and neither visualisation needs to be Goom either (libvisual, although I'm guessing that shares some code with goom).

Moving to base on the supposition playbin is at fault.
Comment 3 Ed Catmur 2007-01-23 03:05:17 UTC
Moreover, in totem the bug is never triggered when starting playing a file but only when changing visualisation.  And the bug is only triggered when changing visualisation while playing an AAC file; oggs etc. are fine.
Comment 4 Ed Catmur 2007-01-24 21:15:52 UTC
When playing oggs, gst_goom_sink_setcaps() gets called from:
  • #0 gst_goom_sink_setcaps
    at gstgoom.c line 216
  • #1 gst_pad_set_caps
    at gstpad.c line 2328
  • #2 gst_proxy_pad_do_setcaps
    at gstghostpad.c line 300
  • #3 gst_pad_set_caps
    at gstpad.c line 2328
  • #4 gst_pad_chain_unchecked
    at gstpad.c line 2387
  • #5 gst_pad_push
    at gstpad.c line 3578
  • #6 gst_base_transform_chain
    at gstbasetransform.c line 1548

Note that this is an optimised build; gstpad.c:2387 is actually in gst_pad_configure_sink(). The problem is thus ll 3394-3399,

  /* we got a new datatype on the pad, see if it can handle it */
  if (G_UNLIKELY (caps_changed)) {
    GST_DEBUG_OBJECT (pad, "caps changed to %p %" GST_PTR_FORMAT, caps, caps);
    if (G_UNLIKELY (!gst_pad_configure_sink (pad, caps)))
      goto not_negotiated;
  }

caps_changed is not getting set when the first data comes through.

Ah... so the problem is that faad does not set caps on its buffers.  Is this allowed?
Comment 5 Ed Catmur 2007-01-24 21:21:09 UTC
And this was fixed ages ago.  Time to ask my distro why gst-plugins-faad hasn't been updated to gst-plugins-bad-10.0.3.  Grr.