Bug 6069 - Crash when generating bindings
Summary: Crash when generating bindings
Status: RESOLVED DUPLICATE of bug 17797
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Rob Taylor
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-01 05:29 UTC by Ross Burton
Modified: 2011-04-14 04:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Stab at something (2.58 KB, patch)
2006-03-01 23:35 UTC, Ross Burton
Details | Splinter Review

Description Ross Burton 2006-03-01 05:29:57 UTC
The following XML file:

<node name="/Foo">
  <interface name="Foo.Bar">
    <method name="BarFoo">
      <arg direction="out" type="a{s(g)}" />
    </method>
  </interface>
</node>

Causes the binding-tool to crash:

** ERROR **: file dbus-gsignature.c: line 154 (_dbus_gtype_from_signature_iter):
assertion failed: (dbus_type_is_container (current_type))

This is with CVS as of 20060228 (just after 0.61).
Comment 1 Ross Burton 2006-03-01 22:54:21 UTC
<arg direction="out" type="g" /> is enough to cause the crash.
Comment 2 Ross Burton 2006-03-01 23:35:01 UTC
Created attachment 4785 [details] [review]
Stab at something

The attached patch causes the following method to be generated:

gboolean
Foo_Bar_bar_foo (DBusGProxy *proxy, DBusGSignature** OUT_arg0, GError **error)
{
  return dbus_g_proxy_call (proxy, "BarFoo", error,
			    G_TYPE_INVALID,
			    DBUS_TYPE_G_SIGNATURE, OUT_arg0,
			    G_TYPE_INVALID);
}

Is this okay?
Comment 3 Robert McQueen 2006-03-03 13:39:17 UTC
I've discussed this with Ross on Jabber, I'd prefer to see signatures
represented as GTypes now that even stuff like structs have parameterised types
which describe the contents etc. It avoids un-necessary exposure to D-Bus
signatures to the binding user.

A related point comes to mind, internally we have functions for converting a
GType to a signature and back again: should we add these to the public API?
Comment 4 Simon McVittie 2011-04-14 04:34:49 UTC
This was fixed in 0.78.

*** This bug has been marked as a duplicate of bug 17797 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.