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.
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.
Author: Wim Taymans <firstname.lastname@example.org>
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