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 661911 - Audiotestsrc segfaults when trying to changing 'wave' parameter
Audiotestsrc segfaults when trying to changing 'wave' parameter
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.11.x
Other Linux
: Normal major
: 0.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-16 14:26 UTC by Peteris Krisjanis
Modified: 2011-10-17 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peteris Krisjanis 2011-10-16 14:26:57 UTC
This is for git branch 0.11, compiled today.

1. I tried this in two ways - using Gobject Introspection and command line pipeline. GI version looked like this (this is simplified part of Jokosher port):

from gi.repository import Gst
Gst.init(None)
clickTrackAudioSrc = Gst.ElementFactory.make("audiotestsrc", "Click_Track_AudioSource")
self.clickTrackAudioSrc.set_property("wave", 3) (at this point I got segfault)

Command line pipeline looked like this:

/data/opt/gnome/bin/gst-launch-0.11 audiotestsrc wave=1 ! fakesink

2. I got segfault and when running command line pipeline within jhbuild enviroment, I got suggestion to attach gdb to the process which I did.

3. After attaching I get bt who looked like this:

    (gdb) bt
    #0 0x0097b416 in __kernel_vsyscall ()
    #1 0x4cc7efb0 in __nanosleep_nocancel () from /lib/libpthread.so.0
    #2 0x0017d06e in g_usleep (microseconds=1000000) at gtimer.c:253
    #3 0x0804b8a4 in fault_spin () at gst-launch.c:147
    #4 fault_handler_sigaction (signum=11, si=0xbfd0254c, misc=0xbfd025cc) at gst-launch.c:128
    #5 <signal handler called>
    #6 gst_audio_test_src_change_wave (src=0x92cc1f0) at gstaudiotestsrc.c:888
    #7 0x006f1f16 in object_set_property (nqueue=0x9276340, value=0xbfd02a34, pspec=<optimized out>, object=0x92cc1f0) at gobject.c:1199
    #8 g_object_set_property (object=0x92cc1f0, property_name=0xb3380e "wave", value=0xbfd02a34) at gobject.c:1929
    #9 0x0082917a in gst_parse_element_set (value=0x92cbf38 "wave", element=0x92cc1f0, graph=0xbfd030c8) at ./grammar.y:439
    #10 0x0082ab62 in priv_gst_parse_yyparse (scanner=0x925bb08, graph=0xbfd030c8) at ./grammar.y:672
    #11 0x0082cb95 in priv_gst_parse_launch (str=0x92ca500 "audiotestsrc wave=1 ! fakesink ", error=0xbfd034a4, ctx=0x0, flags=GST_PARSE_FLAG_NONE)
    at ./grammar.y:927
    #12 0x00822785 in gst_parse_launch_full (pipeline_description=0x92ca500 "audiotestsrc wave=1 ! fakesink ", context=0x0, flags=GST_PARSE_FLAG_NONE,
    error=0xbfd034a4) at gstparse.c:338
    #13 0x0082297d in gst_parse_launchv_full (argv=0x925afc0, context=0x0, flags=GST_PARSE_FLAG_NONE, error=0xbfd034a4) at gstparse.c:274
    #14 0x00822a43 in gst_parse_launchv (argv=0x925afc0, error=0xbfd034a4) at gstparse.c:226
    #15 0x0804a576 in main (argc=5, argv=0xbfd03564) at gst-launch.c:911
    (gdb)
Comment 1 Peteris Krisjanis 2011-10-16 14:44:03 UTC
Additionally, 'src' variable in gstaudiotestsrc.c:888 (where actual segfault happens) looks like this (command p *src output):

    $4 = {parent = {element = {object = {object = {g_type_instance = {
    g_class = 0x888d438}, ref_count = 2, qdata = 0x88a7e80},
    lock = 0x889e478, name = 0x888d800 "Click_Track_AudioSource",
    parent = 0x0, flags = 128, _gst_reserved = 0x0}, state_lock = {
    mutex = {runtime_mutex = 0x0, static_mutex = {
    pad = '\000' <repeats 23 times>, dummy_double = 0,
    dummy_pointer = 0x0, dummy_long = 0}}, depth = 0, owner = {
    data = "\000\000\000", dummy_double = 0, dummy_pointer = 0x0,
    dummy_long = 0}}, state_cond = 0x888d958, state_cookie = 0,
    target_state = GST_STATE_NULL, current_state = GST_STATE_NULL,
    next_state = GST_STATE_VOID_PENDING,
    pending_state = GST_STATE_VOID_PENDING,
    last_return = GST_STATE_CHANGE_SUCCESS, bus = 0x0, clock = 0x0,
    base_time = 0, start_time = 0, numpads = 1, pads = 0x8743d70,
    numsrcpads = 1, srcpads = 0x8743d80, numsinkpads = 0, sinkpads = 0x0,
    pads_cookie = 1, _gst_reserved = {0x0, 0x0, 0x0, 0x0}},
    srcpad = 0x888cb98, live_lock = 0x888d9e0, live_cond = 0x888da00,
    is_live = 0, live_running = 0, blocksize = 4294967295,
    can_activate_push = 1, random_access = 0, clock_id = 0x0, segment = {
    flags = GST_SEGMENT_FLAG_NONE, rate = 1, applied_rate = 1,
    format = GST_FORMAT_TIME, base = 0, start = 0,
    stop = 18446744073709551615, time = 0, position = 0,
    duration = 18446744073709551615}, need_newsegment = 0, num_buffers = -1,
    num_buffers_left = -1, typefind = 0, running = 0, pending_seek = 0x0,
    priv = 0x88a7900, _gst_reserved = {0x0 <repeats 20 times>}}, process = 0,
    wave = GST_AUDIO_TEST_SRC_WAVE_TRIANGLE, volume = 0.80000000000000004,
    freq = 440, info = {finfo = 0x0, flags = GST_AUDIO_FLAG_NONE, rate = 0,
    channels = 0, bpf = 0, position = {
    GST_AUDIO_CHANNEL_POSITION_FRONT_MONO <repeats 64 times>}},
    samples_per_buffer = 1024, tags_pushed = 0, timestamp_offset = 0,
    next_time = 0, next_sample = 0, next_byte = 0, sample_stop = 0,
    check_seek_stop = 0, eos_reached = 0, generate_samples_per_buffer = 1024,
    can_activate_pull = 0, reverse = 0, gen = 0x0, accumulator = 0, pink = {
    rows = {0 <repeats 30 times>}, running_sum = 0, index = 0, index_mask = 0,
    scalar = 0}, red = {state = 0}, wave_table = {0 <repeats 1024 times>}}
Comment 2 Tim-Philipp Müller 2011-10-17 14:48:49 UTC
Thanks for the bug report, should be fixed now:

 commit a586547b0cf6d2852a6fc90ac4a4ebc10604020a
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Mon Oct 17 15:41:58 2011 +0100

    audiotestsrc: fix crash when setting the wave property before having negotiated a format
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661911