← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~mterry/indicator-appmenu/dont-abort-at-drop-of-hat into lp:indicator-appmenu

 

Michael Terry has proposed merging lp:~mterry/indicator-appmenu/dont-abort-at-drop-of-hat into lp:indicator-appmenu.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)
Related bugs:
  #708041 unity-panel-service crashed with signal 5 in g_closure_invoke()
  https://bugs.launchpad.net/bugs/708041

For more details, see:
https://code.launchpad.net/~mterry/indicator-appmenu/dont-abort-at-drop-of-hat/+merge/48940

g_error calls abort(), so really shouldn't be used the way it is in indicator-appmenu, especially since it's a module that can take down the whole panel-service.  See bug 708041 for an example of this crashing real people's panels.
-- 
https://code.launchpad.net/~mterry/indicator-appmenu/dont-abort-at-drop-of-hat/+merge/48940
Your team ayatana-commits is subscribed to branch lp:indicator-appmenu.
=== modified file 'src/indicator-appmenu.c'
--- src/indicator-appmenu.c	2011-02-07 17:02:50 +0000
+++ src/indicator-appmenu.c	2011-02-08 16:34:28 +0000
@@ -255,7 +255,7 @@
 
 		node_info = g_dbus_node_info_new_for_xml(_application_menu_registrar, &error);
 		if (error != NULL) {
-			g_error("Unable to parse Application Menu Interface description: %s", error->message);
+			g_critical("Unable to parse Application Menu Interface description: %s", error->message);
 			g_error_free(error);
 		}
 	}
@@ -264,7 +264,7 @@
 		interface_info = g_dbus_node_info_lookup_interface(node_info, REG_IFACE);
 
 		if (interface_info == NULL) {
-			g_error("Unable to find interface '" REG_IFACE "'");
+			g_critical("Unable to find interface '" REG_IFACE "'");
 		}
 	}
 
@@ -361,7 +361,7 @@
 	                                                            &error);
 
 	if (error != NULL) {
-		g_error("Unable to register the object to DBus: %s", error->message);
+		g_critical("Unable to register the object to DBus: %s", error->message);
 		g_error_free(error);
 		g_bus_unown_name(iapp->owner_id);
 		iapp->owner_id = 0;
@@ -385,10 +385,10 @@
 	IndicatorAppmenu * iapp = INDICATOR_APPMENU(user_data);
 
 	if (connection == NULL) {
-		g_error("OMG! Unable to get a connection to DBus");
+		g_critical("OMG! Unable to get a connection to DBus");
 	}
 	else {
-		g_error("Unable to claim the name %s", DBUS_NAME);
+		g_critical("Unable to claim the name %s", DBUS_NAME);
 	}
 
 	/* We can rest assured no one will register with us, but let's
@@ -496,7 +496,7 @@
 
 		dbg_node_info = g_dbus_node_info_new_for_xml(_application_menu_renderer, &error);
 		if (error != NULL) {
-			g_error("Unable to parse Application Menu Renderer Interface description: %s", error->message);
+			g_critical("Unable to parse Application Menu Renderer Interface description: %s", error->message);
 			g_error_free(error);
 		}
 	}
@@ -505,7 +505,7 @@
 		dbg_interface_info = g_dbus_node_info_lookup_interface(dbg_node_info, DEBUG_IFACE);
 
 		if (dbg_interface_info == NULL) {
-			g_error("Unable to find interface '" DEBUG_IFACE "'");
+			g_critical("Unable to find interface '" DEBUG_IFACE "'");
 		}
 	}
 
@@ -538,7 +538,7 @@
 	GDBusConnection * connection = g_bus_get_finish(res, &error);
 
 	if (error != NULL) {
-		g_error("OMG! Unable to get a connection to DBus: %s", error->message);
+		g_critical("OMG! Unable to get a connection to DBus: %s", error->message);
 		g_error_free(error);
 		return;
 	}
@@ -563,7 +563,7 @@
 	                                                             &error);
 
 	if (error != NULL) {
-		g_error("Unable to register the object to DBus: %s", error->message);
+		g_critical("Unable to register the object to DBus: %s", error->message);
 		g_error_free(error);
 		return;
 	}
@@ -612,7 +612,7 @@
 		                       &error);
 
 	if (error != NULL) {
-		g_error("Unable to send %s signal: %s", name, error->message);
+		g_critical("Unable to send %s signal: %s", name, error->message);
 		g_error_free(error);
 		return;
 	}

=== modified file 'src/window-menus.c'
--- src/window-menus.c	2011-02-03 19:23:01 +0000
+++ src/window-menus.c	2011-02-08 16:34:28 +0000
@@ -460,7 +460,7 @@
 	}
 
 	if (error != NULL) {
-		g_error("Could not grab DBus proxy for window %u: %s", priv->windowid, error->message);
+		g_critical("Could not grab DBus proxy for window %u: %s", priv->windowid, error->message);
 		g_error_free(error);
 		return;
 	}


Follow ups