GNOME Bugzilla – Bug 685332
GstMeta registry race
Last modified: 2012-10-03 18:28:15 UTC
My test transcoding app often (~50% of the time) prints this out near startup: (python:8136): GLib-GObject-CRITICAL **: g_pointer_type_register_static: assertion `g_type_from_name (name) == 0' failed I think (see stack below) this is because there's nothing preventing multiple concurrent calls to gst_meta_register from a single site, in different threads - i.e. like the GType registration, I think we need to use g_once_* stuff to prevent this. I ran into this with the video meta, but I assume this applies to all the others. If people agree, I can prepare some patches. With G_DEBUG=fatal_warnings, the stack looks like: Program received signal SIGTRAP, Trace/breakpoint trap.
+ Trace 230947
Thread 140737127630592 (LWP 8147)
g_once is the way to go, I patched up the docs and the onces in core, if you make some patches for the other, that would be great. commit ed19974e25a6bf318a3ef2c3c86afe2369f56def Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Wed Oct 3 13:45:22 2012 +0200 meta: do metadata registration threadsafe We need to use g_once to register the metadata implementations only once. See https://bugzilla.gnome.org/show_bug.cgi?id=685332