[Pkg-cli-libs-commits] [notify-sharp] 01/02: Cherry-pick patch to fix crash when notification updates fail

Chow Loong Jin hyperair at ubuntu.com
Mon Aug 26 08:39:08 UTC 2013


This is an automated email from the git hooks/post-receive script.

hyperair pushed a commit to branch master
in repository notify-sharp.

commit 445d713ec296718a19b7890ceb65aea3c58f4034
Author: Chow Loong Jin <hyperair at debian.org>
Date:   Sat Feb 2 17:46:32 2013 +0800

    Cherry-pick patch to fix crash when notification updates fail
    
    Closes: #699503
---
 ...-fix-crash-when-notification-updates-fail.patch |   35 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/05-fix-crash-when-notification-updates-fail.patch b/debian/patches/05-fix-crash-when-notification-updates-fail.patch
new file mode 100644
index 0000000..5630bc6
--- /dev/null
+++ b/debian/patches/05-fix-crash-when-notification-updates-fail.patch
@@ -0,0 +1,35 @@
+From 29552f7d62ad84c3e83fe26afbe125543f149d5f Mon Sep 17 00:00:00 2001
+From: Mirco Bauer <meebey at meebey.net>
+Date: Thu, 31 Jan 2013 06:32:11 +0100
+Subject: [PATCH] Fixed application crash in GTK+ callback when notification
+ updates fail
+
+For an example how this can crash an application see here:
+https://www.smuxi.org/issues/show/809
+---
+ src/Notification.cs |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+Index: notify-sharp/src/Notification.cs
+===================================================================
+--- notify-sharp.orig/src/Notification.cs	2013-02-02 17:43:47.023709602 +0800
++++ notify-sharp/src/Notification.cs	2013-02-02 17:45:21.273648920 +0800
+@@ -306,9 +306,15 @@
+ 			if (shown && !updates_pending) {
+ 				updates_pending = true;
+ 				GLib.Timeout.Add (100, delegate {
+-					if (updates_pending) {
+-						Show ();
+-						updates_pending = false;
++					try {
++						if (updates_pending) {
++							Show ();
++							updates_pending = false;
++						}
++					} catch (Exception ex) {
++						// do not throw an exception in a GTK+ callback as
++						// this will _crash_ the application
++						Console.WriteLine("Ignoring exception: {0}", ex);
+ 					}
+ 					return false;
+ 				});
diff --git a/debian/patches/series b/debian/patches/series
index 1e38f89..0182781 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 02_reverse_cap_check.patch
 03-use-dbus-sharp.patch
 04-fix-app-name-derivation.patch
+05-fix-crash-when-notification-updates-fail.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-libs/packages/notify-sharp.git



More information about the Pkg-cli-libs-commits mailing list