GNOME Bugzilla – Bug 639952
GLib.Variant.new_variant() created objects cause segfaults with each operation
Last modified: 2011-04-15 14:04:04 UTC
Created attachment 178728 [details]
I can create a variant containing a variant just fine, but trying to call any method on it just segfaults:
$ gdb --args python -c 'from gi.repository import GLib; v=GLib.Variant.new_variant(GLib.Variant.new_int32(-42)); print v.get_type_string()'
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff58d72f4 in g_variant_type_info_check (info=0x0, container_class=0 '\000')
164 g_assert (info->alignment == 0 || info->alignment == 1 ||
As the full stack trace is quite large, I'll attach it.
This is with glib, pygobject, and gobject-introspection git master as of today.
Interestingly it does work with the variant builder:
>>> from gi.repository import GLib
>>> i = GLib.Variant.new_int32(-42)
>>> builder = GLib.VariantBuilder()
>>> import gi
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.