GNOME Bugzilla – Bug 608089
Applications aborted at finalizing when the dbus session is being closed.
Last modified: 2010-06-24 06:26:27 UTC
from http://trac.galago-project.org/ticket/195 "If the dbus session bus is being closed, even though applications wants to destroy the own objects properly, NotifyNotification? object prevents it with SIGABRT (strictly speaking, in dbus-glib). IMHO the finalizer for NotifyNotification? just gives up to destroy the dbus-related things if the session bus is closed and done without aborting. I saw this issue on libnotify 0.4.5."
Akira, can you provide some more details on what the issue is here? Thanks!
Sure. I have a GObject that has an instance of NotifyNotification and invoking g_object_unref for that in finalization. this works except finalizing by closing X session, which also means the dbus session is being closed. In this case, SIGABRT happens during g_object_unref by the sanity check before doing the actual works on the function in dbus-glib. For a workaround to not hit this issue, I'm checking the DBusConnection is still valid with dbus_connection_get_is_connected though, IMHO it should be done in libnotify. For refernces, some backtraces including bugs marked as duplicate in https://bugzilla.redhat.com/show_bug.cgi?id=530357 may helps.
Created attachment 164470 [details] [review] Fix possible assertions when exiting When finalizing the notifications, only disconnect the signals from the proxy if the D-Bus connection is still alive. Otherwise dbus-glib will assert() with: dbus_g_proxy_disconnect_signal: assertion `!DBUS_G_PROXY_DESTROYED (proxy)' failed
Created attachment 164472 [details] [review] Don't try to use the proxy after it is destroyed
Pushed a variation on my last patch. I think it should do the trick. Please reopen if it doens't.