Bug 23617

Summary: dbus-gvalue should set an error when demarshal_basic doesn't recognize type
Product: dbus Reporter: Andres Salomon <dilinger>
Component: GLibAssignee: Rob Taylor <rob.taylor>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: walters
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: fix for assertion that shouldn't be triggered

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.