[Bug 40129] Set a proper error if CM crashes

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 13 13:45:16 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=40129

Will Thompson <will.thompson at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #2 from Will Thompson <will.thompson at collabora.co.uk> 2011-09-13 04:45:15 PDT ---
Upon closer inspection, MC already does set a reasonable ConnectionError,
namely org.freedesktop.DBus.NoReply (which is the closest error defined in
either Telepathy or D-Bus itself (inasmuch as it's defined by D-Bus, given that
it's not in the D-Bus specification (doh!))). It doesn't set debug-message,
mainly because telepathy-glib does not: actually, there's no special handling
in MC, it's just what happens inside tp-glib when the connection's bus name
dies: the connection is invalidated, and as a result MC ends up calling
tp_connection_get_detailed_error(), which guesses ConnectionError based on the
GError:

      else if (proxy->invalidated->domain == TP_DBUS_ERRORS)
        {
          switch (proxy->invalidated->code)
            {
            case TP_DBUS_ERROR_NAME_OWNER_LOST:
              /* the CM probably crashed */
              return DBUS_ERROR_NO_REPLY;
              break;

TP_DBUS_ERROR_NAME_OWNER_LOST would be a closer match for “it crashed”, but as
this code implicitly illustrates, it's not actually a D-Bus error name.

Here is an MC branch which does some cleanup and adds a test case for this
situation:
http://cgit.collabora.com/git/user/wjt/telepathy-mission-control-wjt.git/log/?h=fd.o-40129-set-a-proper-error-if-CM-crashes

And here is a little tp-glib tweak which makes it specify debug-message in this
situation:
http://cgit.collabora.com/git/user/wjt/telepathy-glib.git/commit/?h=fd.o-40129-set-debug-message-if-cm-crashes

Otherwise I think we get to go fix Empathy and the Shell…

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the telepathy-bugs mailing list