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 156565 - gst_bin_remove crashes deep down
gst_bin_remove crashes deep down
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-27 10:53 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
reproduces the bug (1.78 KB, text/plain)
2004-11-01 10:18 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details
reproduces the bug (1.95 KB, text/plain)
2004-11-01 10:25 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details

Description Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-27 10:53:50 UTC
0x408333cb in strlen () from /lib/tls/libc.so.6
(gdb) bt
  • #0 strlen
    from /lib/tls/libc.so.6
  • #1 vfprintf
    from /lib/tls/libc.so.6
  • #2 vasprintf
    from /lib/tls/libc.so.6
  • #3 g_strdup_vprintf
    from /opt/gnome/lib/libglib-2.0.so.0
  • #4 gst_debug_message_get
    at gstinfo.c line 370
  • #5 gst_debug_log_default
    at gstinfo.c line 511
  • #6 gst_debug_log_valist
    at gstinfo.c line 350
  • #7 gst_debug_log
    at gstinfo.c line 310
  • #8 gst_pad_get_scheduler
    at gstpad.c line 1985
  • #9 gst_bin_unset_element_sched
    at gstbin.c line 418
  • #10 gst_bin_remove_func
    at gstbin.c line 560
  • #11 gst_bin_remove
    at gstbin.c line 624

Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-27 12:51:28 UTC
here is another backtrace - it looks like as if in gst_pad_get_scheduler()
gst_pad_get_parent(pad); returns something that is not NUL but not a GstElement.


  • #0 g_type_check_instance_is_a
    from /opt/gnome/lib/libgobject-2.0.so.0
  • #1 gst_pad_get_scheduler
    at gstpad.c line 1976
  • #2 gst_bin_unset_element_sched
    at gstbin.c line 418
  • #3 gst_bin_remove_func
    at gstbin.c line 560
  • #4 gst_bin_remove
    at gstbin.c line 624
  • #5 bt_machine_dispose
    at machine.c line 500
  • #6 bt_sink_machine_dispose
    at sink-machine.c line 120
  • #7 g_object_unref
    from /opt/gnome/lib/libgobject-2.0.so.0
  • #8 bt_setup_dispose
    at setup.c line 391
  • #9 g_object_unref
    from /opt/gnome/lib/libgobject-2.0.so.0
  • #10 bt_song_dispose
    at song.c line 229
  • #11 g_object_unref
    from /opt/gnome/lib/libgobject-2.0.so.0
  • #12 bt_cmd_application_play
    at cmd-application.c line 106
  • #13 main
    at bt-cmd.c line 55

Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-29 12:35:14 UTC
BBB says:
audioconvert doesn't handle readonly buffers
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-29 12:51:22 UTC
iggnore #2 belongs to different buf
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-29 12:52:40 UTC
Breakpoint 1, gst_pad_get_scheduler (pad=0x826c120) at gstpad.c:1974
1974        if (GST_FLAG_IS_SET (parent, GST_ELEMENT_DECOUPLED)) {
(gdb) print *parent
$3 = {object = {object = {g_type_instance = {g_class = 0x82772d8}, ref_count =
1083131240, qdata = 0x34303878}, name = 0x30323866 <Address 0x30323866 out of
bounds>, lock = 0x33202d20,
    parent = 0x39323530, flags = 959724082, _gst_reserved = {0x2e39313a,
0x34353932, 0x30303236, 0x1b202930}}, current_state = 91 '[', pending_state = 48
'0', loopfunc = 0x20202020,
  sched = 0x20202020, sched_private = 0x632d7462, clock = 0x1b65726f, base_time
= 3700581379259510875, numpads = 12595, numsrcpads = 12909, numsinkpads = 13622,
pads = 0x30305b1b,
  state_mutex = 0x1b20296d, state_cond = 0x6d30305b, pre_run_func = 0x6863616d,
post_run_func = 0x2e656e69, prop_value_queue = 0x39352863, property_mutex =
0x623a2935, _gst_reserved = {
    0x616d5f74, 0x6e696863, 0x69645f65, 0x736f7073}}
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2004-10-29 13:01:50 UTC
just a few lines before in my own code I remove another element (which works)
and there the same output from gdb look sane:
(gdb) print *parent
$2 = {object = {object = {g_type_instance = {g_class = 0x826d8c0}, ref_count =
2, qdata = 0x0}, name = 0x826ede8 "input_level_0x8269be0", lock = 0x826e5b8,
parent = 0x8249dc8, flags = 0,
    _gst_reserved = {0x0, 0x0, 0x0, 0x0}}, current_state = 1 '\001',
pending_state = 0 '\0', loopfunc = 0, sched = 0x824b060, sched_private =
0x826ee28, clock = 0x0, base_time = 0,
  numpads = 2, numsrcpads = 1, numsinkpads = 1, pads = 0x82257d8, state_mutex =
0x826e5d8, state_cond = 0x826e5f8, pre_run_func = 0, post_run_func = 0,
prop_value_queue = 0x804e2e8,
  property_mutex = 0x826f288, _gst_reserved = {0x0, 0x0, 0x0, 0x0}}


The calling code looks like:
    g_assert(GST_IS_BIN(self->priv->bin));
    if(self->priv->spreader) {
      g_assert(GST_IS_ELEMENT(self->priv->spreader));
      gst_bin_remove(self->priv->bin,self->priv->spreader);
    }
    if(self->priv->input_level) {
      g_assert(GST_IS_ELEMENT(self->priv->input_level));
      gst_bin_remove(self->priv->bin,self->priv->input_level);
    }
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2004-11-01 10:18:07 UTC
Created attachment 33304 [details]
reproduces the bug

compile:
gcc -Wall -g `pkg-config gstreamer-0.8 --cflags --libs` gst4.c -o gst4

run:
gdb --args ./gst4 --gst-debug="*:3"
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2004-11-01 10:24:12 UTC
Comment on attachment 33304 [details]
reproduces the bug

when using fakesink/fakesource or alsasink/alsasource it works - so I conclude
its in esdsink
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2004-11-01 10:25:57 UTC
Created attachment 33305 [details]
reproduces the bug

now has some defines to play around with it
Comment 9 Jan Schmidt 2004-11-01 11:23:18 UTC
I fixed the esdsink dispose function here:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/esd/esdsink.c.diff?r1=1.41&r2=1.42