action exporter fails in the presence of actions with maybe parameter types
@chpe
Submitted by Christian Persch Assigned to gtk..@..tk.org
Link to original bug (#724581)
Description
When you insert an action into a GtkApplicationWindow with a parameter type containing maybe types (ie "(sms)") (which the docs don't mention as being forbidden!), it succeeds at first, but then the action group exporter is called and tries to export that action, it fails with multiple assertion failures. The first one being this one:
(gnome-terminal-server:19036): GLib-CRITICAL **: g_variant_new_signature: assertion 'g_variant_is_signature (signature)' failed
(gdb) where
#0 g_log (log_domain=log_domain@entry=0xb723864e "GLib",
log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
format=format@entry=0xb724117e "%s: assertion '%s' failed")
at /home/chpe/devel/checkout/glib/glib/gmessages.c:1070
#1 0xb71cb5cd in g_return_if_fail_warning (log_domain=log_domain@entry=0xb723864e "GLib",
pretty_function=pretty_function@entry=0xb7287fb3 <__FUNCTION__.4838> "g_variant_new_signature", expression=expression@entry=0xb7285e50 "g_variant_is_signature (signature)")
at /home/chpe/devel/checkout/glib/glib/gmessages.c:1080
#2 0xb71f8e2a in g_variant_new_signature (signature=0x8526660 "(sms)")
at /home/chpe/devel/checkout/glib/glib/gvariant.c:1369
#3 0xb71fce50 in g_variant_valist_new_nnp (str=str@entry=0xbfffe410, ptr=<optimized out>)
at /home/chpe/devel/checkout/glib/glib/gvariant.c:4664
#4 0xb71fe67b in g_variant_valist_new_leaf (app=0xbfffe42c, str=0xbfffe410)
at /home/chpe/devel/checkout/glib/glib/gvariant.c:4844
#5 g_variant_valist_new (str=str@entry=0xbfffe410, app=app@entry=0xbfffe42c)
at /home/chpe/devel/checkout/glib/glib/gvariant.c:5026
#6 0xb71fe6e2 in g_variant_new_va (format_string=0xb7426f38 "", endptr=0x0, app=0xbfffe42c)
at /home/chpe/devel/checkout/glib/glib/gvariant.c:5254
#7 0xb71febb2 in g_variant_builder_add (builder=builder@entry=0xbfffe460,
format_string=format_string@entry=0xb7426f37 "g")
at /home/chpe/devel/checkout/glib/glib/gvariant.c:5410
#8 0xb73b2a23 in g_action_group_describe_action (action_group=0x820ed28,
name=name@entry=0x85250f0 "test-maybe")
at /home/chpe/devel/checkout/glib/gio/gactiongroupexporter.c:64
#9 0xb73b3167 in org_gtk_Actions_method_call (connection=0xb3c07028,
sender=sender@entry=0xb3201fe0 ":1.394",
object_path=object_path@entry=0xb320fe78 "/org/example/Test/window/1",
interface_name=interface_name@entry=0xb326a5d8 "org.gtk.Actions",
method_name=method_name@entry=0xb3203670 "DescribeAll",
parameters=parameters@entry=0xb326ab18, invocation=invocation@entry=0x822d4e8,
user_data=user_data@entry=0x83f1808)
at /home/chpe/devel/checkout/glib/gio/gactiongroupexporter.c:407
It shouldn't do that :-)
Since maybe types are (IMO) very useful for action parameters, I think the exporter should cope with dbus being maybe-intolerant.