From 682328cded9d509f121fcd0fc550919e9532ffb9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 6 Jul 2013 11:42:41 -0400 Subject: Add e_activity_get_last_known_text(). Evolution is still occasionally getting stuck on shutdown, and although the evolution-shell log domain shows debug messages for activities that are preventing shutdown, they frequently look like this: (evolution:13534): evolution-shell-DEBUG: 5 active 'mail' activities: (evolution:13534): evolution-shell-DEBUG: * (no description) (evolution:13534): evolution-shell-DEBUG: * (no description) (evolution:13534): evolution-shell-DEBUG: * (no description) (evolution:13534): evolution-shell-DEBUG: * (no description) (evolution:13534): evolution-shell-DEBUG: * (no description) I think the lack of descriptions is from CamelOperations popping all their pushed messages, which is correct behavior but doesn't help us debug the problem. e_activity_get_last_known_text() returns the most recent _non-empty_ text value set on the EActivity. So our debug message can fall back to that if the EActivity has no description at shutdown: (evolution:13534): evolution-shell-DEBUG: * (was "blah, blah, blah") --- shell/e-shell-backend.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shell') diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c index 5f7666b238..e4926c5c0a 100644 --- a/shell/e-shell-backend.c +++ b/shell/e-shell-backend.c @@ -105,12 +105,18 @@ shell_backend_debug_list_activities (EShellBackend *shell_backend) for (link = head; link != NULL; link = g_list_next (link)) { EActivity *activity = E_ACTIVITY (link->data); gchar *description; + const gchar *was; description = e_activity_describe (activity); + was = e_activity_get_last_known_text (activity); + if (description != NULL) g_debug ("* %s", description); + else if (was != NULL) + g_debug ("* (was \"%s\")", was); else g_debug ("* (no description)"); + g_free (description); } } -- cgit v1.2.3