Ok, I think I have this worked out. GTK is throwing a critical warning, and since notification-daemon calls g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL) it results in SIGTRAP where most GTK-using programs will just output a message to stderr.
The problem seems to be that GtkStatusIcon defaults to a size of 4 somewhere, and then rounds this down to 0, and so tries to make a zero-sized icon. If the critical warning doesn't terminate the program, GtkStatusIcon will later on get a larger size and create an appropriately-sized icon. As far as I can tell, older versions of GTK didn't do this because they used a minimum size of GTK_ICON_SIZE_MENU rather than 0 for GtkStatusIcons. I think this changed in http://git.gnome.org/browse/gtk+/commit/gtk/gtkstatusicon.c?id=2e01dc1b7a134a6482f39ae7b3b6c840442c93db in the block @@ -1364,9 +1327,9 @@. This bug should probably be reassigned to gtk+3.0, since it has little to do with notification-daemon. I've attached a small test program to illustrate the problem. As a workaround, the g_log_set_always_fatal call could be commented out in daemon.c.
/* Compile with: gcc -g -Wall bug.c `pkg-config --cflags --libs gtk+-3.0` -o bug */ #include <gtk/gtk.h> int main(int argc, char *argv[]) { GtkStatusIcon *statusicon; GIcon *icon; // Remove this line to make it not crash on the critical error. g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); gtk_init(&argc, &argv); statusicon = gtk_status_icon_new(); gtk_status_icon_set_visible(statusicon, TRUE); icon = g_themed_icon_new("help"); gtk_status_icon_set_from_gicon(statusicon, icon); gtk_main(); return 0; }