During the very exciting Telepathy/GNOME BoF at desktop summit we noticed that killing a connected CM was raising an unknown error, leading to a not helpful message in Empathy and the Shell. MC could detect such error and popup a more useful error.
Assigning to Will as he volunteered to fix this. :)
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…
(In reply to comment #2) > 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… ++
Thanks, merged both branches and filed some Empathy patches over at <https://bugzilla.gnome.org/show_bug.cgi?id=658908>.
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.