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 399807 - [PATCH] call g_thread_init() before any other GLib function
[PATCH] call g_thread_init() before any other GLib function
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: general
2.17.x
Other All
: Normal normal
: 2.17.91
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-23 15:05 UTC by Tim-Philipp Müller
Modified: 2007-01-23 20:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
adds g_thread_init() calls to gstreamer-properties, gnome-cd and gnome-recorder (1.37 KB, patch)
2007-01-23 15:06 UTC, Tim-Philipp Müller
none Details | Review

Description Tim-Philipp Müller 2007-01-23 15:05:36 UTC
Please describe the problem:
Attached patch fixes a few more programs in gnome-media to call g_thread_init() right at the beginning before any other GLib function, as apparently is required (and to avoid warnings from GStreamer to this effect).

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Tim-Philipp Müller 2007-01-23 15:06:36 UTC
Created attachment 80988 [details] [review]
adds g_thread_init() calls to gstreamer-properties, gnome-cd and gnome-recorder
Comment 2 Ronald Bultje 2007-01-23 16:51:22 UTC
Why g_thread_supported()? It's the first function you call, so nothing else can have called it. You can probably just call _init() directly.

As for the rest, go ahead and apply, I sort of expected all tools to need this. :-).
Comment 3 Tim-Philipp Müller 2007-01-23 16:58:47 UTC
> Why g_thread_supported()? It's the first function you call, so nothing else can
> have called it. You can probably just call _init() directly.

Just to guard against the (probably somewhat theoretical) possibility that some library used already initialised the GLib threading system in a constructor function that's called before main().

Can do without, whichever you prefer.


Comment 4 Ronald Bultje 2007-01-23 19:21:27 UTC
We don't do that. If we do, it's a bug. I'd prefer without.
Comment 5 Tim-Philipp Müller 2007-01-23 19:42:01 UTC
Thanks, committed:

  2007-01-23  Tim-Philipp Müller  <tim at centricular dot net>

        * gnome-cd/gnome-cd.c: (main):
        * grecord/src/gnome-recorder.c: (main):
        * gstreamer-properties/gstreamer-properties.c: (main):
          Call g_thread_init() before calling any other GLib function here too.
          Closes #399807.