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 515689 - Core is dumped in a race condition with gnonlin
Core is dumped in a race condition with gnonlin
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gnonlin
0.10.0
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
Edward Hervey
Depends on:
Blocks:
 
 
Reported: 2008-02-11 05:50 UTC by Mike MacHenry
Modified: 2010-05-31 22:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike MacHenry 2008-02-11 05:50:54 UTC
# This program segfaults a dumps core. This is a reduction from my program
# there is some short of race condtion. If there's a sleep between
# the first and second gnlcomposition1.add() it fails.

import gobject
gobject.threads_init()
import pygst
pygst.require("0.10")
import gst
import time

main_loop = gobject.MainLoop()
pipeline = gst.Pipeline()
adder = gst.element_factory_make("adder")
lame = gst.element_factory_make("lame")
fakesink = gst.element_factory_make("fakesink")
pipeline.add(adder, lame,fakesink)
# taking lame out of the pipeline stops the coredump
gst.element_link_many(adder, lame, fakesink)

# Add one compostion
gnlcomposition1 = gst.element_factory_make("gnlcomposition")
audioconvert1 = gst.element_factory_make("audioconvert")
pipeline.add(gnlcomposition1, audioconvert1)
def OnPad (comp, pad):
        convpad = audioconvert1.get_compatible_pad(pad, pad.get_caps())
        pad.link(convpad)
gnlcomposition1.connect("pad-added", OnPad)
srcpad = audioconvert1.get_pad('src')
addersinkpad = adder.get_request_pad('sink%d')
srcpad.link(addersinkpad)

# Add second compostion
gnlcomposition2 = gst.element_factory_make("gnlcomposition")
audioconvert2 = gst.element_factory_make("audioconvert")
pipeline.add(gnlcomposition2, audioconvert2)
def OnPad (comp, pad):
        convpad = audioconvert2.get_compatible_pad(pad, pad.get_caps())
        pad.link(convpad)
gnlcomposition2.connect("pad-added", OnPad)
srcpad = audioconvert2.get_pad('src')
addersinkpad = adder.get_request_pad('sink%d')
srcpad.link(addersinkpad)

def add():
        print "Going..."
        filesrc = gst.element_factory_make("gnlfilesource")
        filesrc.set_property("location", "/home/dskippy/17years.mp3")
        #not givin the filesrc a duration stops the coredump
        filesrc.set_property("duration", 1 * gst.SECOND)
        gnlcomposition1.add(filesrc)
        #taking this sleep out changes the race condition
        #and stops the coredump
        time.sleep(1)
        dead_air = gst.element_factory_make("gnlsource")
        gnlcomposition1.add(dead_air)

pipeline.set_state(gst.STATE_PLAYING)
gobject.idle_add(add)
main_loop.run()
Comment 1 Mike MacHenry 2008-02-11 17:12:49 UTC
The second gnlcomposition2 is not necessary. All that's needed is second call to adder.get_request_pad('sink%d') 
Comment 2 Tim-Philipp Müller 2009-04-16 00:58:21 UTC
Re-assigning to gnonlin. Is this still an issue with more recent versions?
Comment 3 Edward Hervey 2009-05-08 08:53:09 UTC
Mike, do you still get that issue with latest gnonlin releases (or even better gnonling git) ?
Comment 4 Iñigo Illan 2009-07-24 23:42:01 UTC
I was looking for a solution as PiTiVi crashes before starting with a segfault. I have tested the example above and it doesn't work unless you comment the duration setting for filesrc as specified. I'm using Ubuntu Karmic from repositories. It segfaults with both python2.5 and python2.6. Maybe, my crashes with pitivi are related to this ones. If you need more info, just tell.
Comment 5 Edward Hervey 2009-07-27 10:26:05 UTC
Inigo, what version of gnonlin are you using ?
Comment 6 Iñigo Illan 2009-07-27 10:35:38 UTC
I'm using latest version from the gstreamer developers PPA (https://launchpad.net/~gstreamer-developers/+archive/ppa) which is version 0.10.11.2.

Otherwise, Pitivi is working for me now as there was some problem with goocanvas being too old on Ubuntu Karmic.
Comment 7 Tobias Mueller 2010-03-01 10:40:00 UTC
Reopening as the requested information has been provided.
Comment 8 Edward Hervey 2010-05-31 14:39:38 UTC
Can't get it to crash with current gnonlin. Inigo, are you still seeing the issue ?
Comment 9 Iñigo Illan 2010-05-31 20:15:36 UTC
No, I'm not seeing this crash anymore. I suppose you can savely close this bug report.