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 761448 - gst_uri_from_string segmentation fault
gst_uri_from_string segmentation fault
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
Other Linux
: Normal normal
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2016-02-02 10:22 UTC by Adrien CLERC
Modified: 2016-02-02 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Adrien CLERC 2016-02-02 10:22:06 UTC
I have this really simple program:

#include <gst/gst.h>
int main( int argc, char** argv )
    const gchar * string_uri = "http://admin:admin@";
    GstUri * parsed_uri = gst_uri_from_string(string_uri);
    return 0;

It segfault, apparently with the following stack:

(gdb) bt full
  • #0 gst_mini_object_init
    at gstminiobject.c line 133
  • #1 _gst_uri_new
    at gsturi.c line 1019
  • #2 gst_uri_from_string
    at gsturi.c line 1535
  • #3 main(int, char**)
    at main.cpp line 25

I wasn't able to test with 1.6.3, but I didn't see any commit that improved the situation. Did I missed something?
Comment 1 Adrien CLERC 2016-02-02 10:23:59 UTC
Sorry, the backtrace from the initial description is not really the one from the included source code, I was testing with some printf.
But it fails on gst_uri_from_string.
Comment 2 Tim-Philipp Müller 2016-02-02 10:32:02 UTC
I think you need to call gst_init() before using this API.
Comment 3 Adrien CLERC 2016-02-02 10:37:35 UTC
OK. Adding call gst_init works. I may have missed it in the documentation, but this requirements is nowhere to be found in the GstUri page.
Comment 4 Tim-Philipp Müller 2016-02-02 10:41:04 UTC
It pretty much applies to all GStreamer API, unless explicitly mentioned otherwise  :) I'll check if I can add a guard somewhere..
Comment 5 Tim-Philipp Müller 2016-02-02 10:58:39 UTC
commit f90126a62e6b87db0c7627a86a40ed32e6d7334d
Author: Tim-Philipp Müller <>
Date:   Tue Feb 2 10:56:35 2016 +0000

    uri: add guard to make sure gstreamer is initialized
Comment 6 Thibault Saunier 2016-02-02 10:59:48 UTC
We will end up adding guards like that all around if we go that way ;)
Comment 7 Adrien CLERC 2016-02-02 11:00:24 UTC
Wow. Incredible reactivity time. Many thanks for making Gstreamer an awesome software!