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 634365 - gst.pbutils.get_codec_description segfaults
gst.pbutils.get_codec_description segfaults
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal blocker
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-08 21:19 UTC by Frederik Elwert
Modified: 2010-11-22 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pygst: Get the _PyGst_API symbol from the proper module (695 bytes, patch)
2010-11-09 10:01 UTC, Edward Hervey
committed Details | Review

Description Frederik Elwert 2010-11-08 21:19:47 UTC
Running the following code triggers a segmentation fault:

import gst, gst.pbutils
print gst.pbutils.get_codec_description(gst.caps_from_string("audio/mpeg,mpegversion=1,layer=3"))

You find the backtrace at http://paste.ubuntuusers.de/399243/

Running a recent GStreamer build from the PPA on Ubuntu 10.04 Lucid Lynx.
Comment 1 Edward Hervey 2010-11-08 21:21:50 UTC
Confirmed on my gentoo box also.

The problem is that _PyGst_API is NULL .... and therefore pygst_caps_from_object causes a segfault.
Comment 2 Sebastian Dröge (slomo) 2010-11-08 21:37:00 UTC
FWIW this is not a general problem, it doesn't crash for me with the same package versions on Debian.
Maybe it's python version related (2.6.6) or pygobject (2.21.3).
Comment 3 Edward Hervey 2010-11-09 09:56:44 UTC
The problem is that we're trying to get the _PyGst_API symbol from the "_gst" module ... which isn't 100% correct. It should be from the "gst._gst" module.
Comment 4 Edward Hervey 2010-11-09 10:01:12 UTC
Created attachment 174124 [details] [review]
pygst: Get the _PyGst_API symbol from the proper module
Comment 5 Edward Hervey 2010-11-09 10:05:13 UTC
Sebastian, can you check this on debian also ?
Comment 6 Edward Hervey 2010-11-09 12:55:37 UTC
Comment on attachment 174124 [details] [review]
pygst: Get the _PyGst_API symbol from the proper module

commit ee647847f33186e57b6fb3d47409dde9b55b9284
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Tue Nov 9 10:57:31 2010 +0100

    pygst: Get the _PyGst_API symbol from the proper module
    
    https://bugzilla.gnome.org/show_bug.cgi?id=634365
Comment 7 Tim-Philipp Müller 2010-11-21 23:27:33 UTC
This seems to break 'make distcheck' for me in an uninstalled setup:

make check in gst-python-0.10.$xyz/_build/testsuite/ errors out like this:

ImportError: could not import gst (error was: 'No module named _gst')
Fatal Python error: can't initialize module gst.pbutils
Comment 8 Tim-Philipp Müller 2010-11-22 13:35:40 UTC
ommit a1584d04c528d7dadd750a8762eb5ee266fccdca
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Mon Nov 22 14:18:05 2010 +0100

    Fix distcheck some more.
    
    In testsuite/common.py look for gst/__init__.py in builddir now.
    Clean gst/__init__.pyc after make check.

commit cac4f31f1a9a21981ceaf3736f5b2773df974b44
Author: Alessandro Decina <alessandro.decina@collabora.co.uk>
Date:   Mon Nov 22 13:41:17 2010 +0100

    Fix distcheck.
    
    Before this change gst/__init__.py wasn't being copied to
    $(top_builddir)/gst/, making make check fail to import gst.