[Reportbug-commits] [reportbug] 03/11: correctly acquire GDK mutual exclusion lock

Sandro Tosi morph at moszumanska.debian.org
Wed Apr 15 18:08:50 UTC 2015


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

morph pushed a commit to branch master
in repository reportbug.

commit 3671758199ccc3dd7119239d52b6a34a79775005
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Apr 12 20:41:38 2015 +0100

    correctly acquire GDK mutual exclusion lock
    
    Wrapping the gtk.main() function with _enter() and leave() will make reportbug
    correctly acquire the GDK mutual exclusion lock, marking the beginning of a
    critical section that only one thread can operate within at a time.
    
    This will prevent issues like "Attempt to unlock mutex that was not locked" that
    happened with GLib >= 2.14 some time ago.
    
    For some more details from the upstream side, look at:
    https://bugzilla.gnome.org/show_bug.cgi?id=735428
---
 debian/changelog        | 4 +++-
 reportbug/ui/gtk2_ui.py | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 9c10236..4d439e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,8 +5,10 @@ reportbug (6.6.4) UNRELEASED; urgency=medium
       the report; Closes: #776015
   * share/script
     - report PAGER environment variable when filing a bug against reportbug
+  * reportbug/ui/gtk2_ui.py
+    - correctly acquire GDK mutual exclusion lock
 
- -- Sandro Tosi <morph at debian.org>  Thu, 05 Feb 2015 12:06:31 +0000
+ -- Sandro Tosi <morph at debian.org>  Sun, 12 Apr 2015 20:41:14 +0100
 
 reportbug (6.6.3) unstable; urgency=medium
 
diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 5b04840..043bc8c 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -451,7 +451,9 @@ class ReportbugApplication (threading.Thread):
         self.next_value = None
         
     def run (self):
+        gtk.gdk.threads_enter ()
         gtk.main ()
+        gtk.gdk.threads_leave ()
 
     def get_last_value (self):
         return self.queue.get ()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list