Package: notification-daemon Version: 0.4.0-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu karmic ubuntu-patch
The attached patch (together with removing "-Wl,--as-needed" in debian/rules) fixes a crash when theme switching. Cheers, Michael The relevant changelog entries: * Merge from debian testing, remaining changes: * build without "-Wl,--as-needed" to avoid crash on theme switching * debian/patches/09_change_themes_crash_rev1.patch: - fix crash on theme switching -- System Information: Debian Release: squeeze/sid APT prefers karmic-updates APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic') Architecture: i386 (i686) Kernel: Linux 2.6.31-15-generic (SMP w/2 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
only in patch2: unchanged: --- notification-daemon-0.4.0.orig/debian/patches/09_change_themes_crash_rev1.patch +++ notification-daemon-0.4.0/debian/patches/09_change_themes_crash_rev1.patch @@ -0,0 +1,54 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/notification-daemon/+bug/1312277 +# +# Description: When you change theme with notification-properties and press preview button, +# the notification-daemon crashes and notification-properties gets an error message. +# The problem depends on closing unproperly the module (engine->module) because it is closing when it is still +# in use. The patch concerns a correct way to close G_Modules and destroy engine. +# First it destroys widget notification, then it decreases "engine->ref_count" and if requested (engine->ref_count == 0), +# it destroys engine. These steps will be made by the function theme_destroy_widget, that will have to be called every-time +# you want to destroy notification widget (daemon.c). +# +#Practically the daemon destroys engine, in particular "engine->module", when it is already used by the notification pop-up. +#The correct way to destroy engine is this: +# -) Destroy notification pop-up by calling "gtk_distroy_widget". +# -) Decrease value of "engine->ref_count" and if it is equal to zero, unload engine->module and destroy engine. +# +#Currently the daemon works in this modality: +# -) It calls the invokes the destruction of a notification pop-up by calling "gtk_destroy_widget", but with this event is also called "theme_engine_unref". +# -) It decreases value of "engine->ref_count" and if it is equal to zero, it unloads "engine->module" and destroys "engine". +# -) It ends the destruction of a notification pop-up. +# +#The daemon unloads engine->module when it is still in use by gtk_widget. +diff -Nur -x '*.orig' -x '*~' notification-daemon-0.4.0/src/daemon/daemon.c notification-daemon-0.4.0.new/src/daemon/daemon.c +--- notification-daemon-0.4.0/src/daemon/daemon.c 2009-03-19 11:22:39.000000000 +0100 ++++ notification-daemon-0.4.0.new/src/daemon/daemon.c 2009-03-19 11:25:22.000000000 +0100 +@@ -147,7 +147,7 @@ + static void + _notify_timeout_destroy(NotifyTimeout *nt) + { +- gtk_widget_destroy(GTK_WIDGET(nt->nw)); ++ theme_destroy_notification(GTK_WIDGET(nt->nw)); + g_free(nt); + } + +diff -Nur -x '*.orig' -x '*~' notification-daemon-0.4.0/src/daemon/engines.c notification-daemon-0.4.0.new/src/daemon/engines.c +--- notification-daemon-0.4.0/src/daemon/engines.c 2008-11-20 11:45:16.000000000 +0100 ++++ notification-daemon-0.4.0.new/src/daemon/engines.c 2009-03-19 11:25:15.000000000 +0100 +@@ -182,7 +182,7 @@ + ThemeEngine *engine = get_theme_engine(); + GtkWindow *nw = engine->create_notification(url_clicked_cb); + g_object_set_data_full(G_OBJECT(nw), "_theme_engine", engine, +- (GDestroyNotify)theme_engine_unref); ++ NULL); + engine->ref_count++; + return nw; + } +@@ -196,6 +196,7 @@ + engine->destroy_notification(nw); + else + gtk_widget_destroy(GTK_WIDGET(nw)); ++ theme_engine_unref(engine); + } + + void