GNOME Bugzilla – Bug 399613
playbin: sink caps on vis-plugin not getting set (occasional segfault on AAC files)
Last modified: 2007-01-24 21:30:48 UTC
Occasionally when playing AACs, Rhythmbox segvs when I load the Goom visualisation: Program received signal SIGSEGV, Segmentation fault.
+ Trace 104443
Thread NaN (LWP 325)
$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.
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.
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.
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.
When playing oggs, gst_goom_sink_setcaps() gets called from:
+ Trace 104970
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?
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.