Bug 23617 - dbus-gvalue should set an error when demarshal_basic doesn't recognize type
Summary: dbus-gvalue should set an error when demarshal_basic doesn't recognize type
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 19:18 UTC by Andres Salomon
Modified: 2010-01-27 08:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix for assertion that shouldn't be triggered (1.45 KB, patch)
2009-08-31 19:19 UTC, Andres Salomon
Details | Splinter Review

Description Andres Salomon 2009-08-31 19:18:34 UTC
By passing dbus_g_proxy_call an incorrect signature, we can cause
the function to fail but not provide any error message (if
G_DISABLE_ASSERT is defined).  As smvc pointed out, this can also
become a runtime error when a telepathy CM changes signature, but
the client hasn't been updated.  As such, g_assert isn't an appropriate
action.  See http://bugs.debian.org/541632 for more information.

This patch causes it to set an error when demarshalling a type that it's
not expecting.  Instead of a NULL error, one instead
sees something like the following when the method returns a path
object but the client expected a string:

"modem Create() failed: Expected type gchararray, got type code 'o'"
Comment 1 Andres Salomon 2009-08-31 19:19:40 UTC
Created attachment 29055 [details] [review]
fix for assertion that shouldn't be triggered
Comment 2 Martin Pitt 2009-10-13 15:24:34 UTC
Seems this is actively causing bugs which would be much easier to debug when this bug gets fixed: https://bugzilla.gnome.org/show_bug.cgi?id=598339
Comment 3 Colin Walters 2010-01-27 08:07:01 UTC
Applied; thank you for the patch!


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.