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 484225 - web: code from tutorial genrates warning on execution
web: code from tutorial genrates warning on execution
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: www
git master
Other All
: Normal normal
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-06 19:39 UTC by Ritesh Khadgaray ( irc:ritz)
Modified: 2007-10-08 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add glib thread init sequence (478 bytes, patch)
2007-10-06 19:41 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review

Description Ritesh Khadgaray ( irc:ritz) 2007-10-06 19:39:55 UTC
reference:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/x291.html

# ./a.out 
(process:6792): GStreamer-WARNING **: The GStreamer function gst_init_get_option_group() was
        called, but the GLib threading system has not been initialised
        yet, something that must happen before any other GLib function
        is called. The application needs to be fixed so that it calls
           if (!g_thread_supported ()) g_thread_init(NULL);
        as very first thing in its main() function. Please file a bug
        against this application.
Run me with --help to see the Application options appended.



Fix:

  // must initialise the threading system before using any other GLib funtion
  if (!g_thread_supported ())
    g_thread_init (NULL);
Comment 1 Ritesh Khadgaray ( irc:ritz) 2007-10-06 19:41:14 UTC
Created attachment 96786 [details] [review]
patch to add glib thread init sequence
Comment 2 Tim-Philipp Müller 2007-10-08 17:26:29 UTC
Thanks for that patch, committed in the right place, ie. the xml file. Also fixed up another example:

 2007-10-08  Tim-Philipp Müller  <tim at centricular dot net>

        * docs/manual/appendix-integration.xml:
        * docs/manual/basics-init.xml:
          Call g_thread_init() before g_option_context_new() to
          avoid warnings. Spotted by Ritesh Khadgaray. Fixes #484225.