source: pdfshuffler/trunk/fuentes/debian/patches/fix-threading @ 337

Last change on this file since 337 was 337, checked in by jrpelegrina, 4 years ago

Firs release to xenial

File size: 1017 bytes
Line 
1From: Jeremy Lainé <jeremy.laine@m4x.org>
2Subject: fix threading code
3
4Without this patch, pdfshuffler immediately fails with the following error:
5
6    Attempt to unlock mutex that was not locked
7    Aborted
8
9A similar issue was reported against reportbug:
10
11    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758619
12
13--- a/pdfshuffler/pdfshuffler.py
14+++ b/pdfshuffler/pdfshuffler.py
15@@ -326,11 +326,9 @@ class PdfShuffler:
16   
17     def update_thumbnail(self, object, num, thumbnail, resample):
18         row = self.model[num]
19-        gtk.gdk.threads_enter()
20         row[13] = resample
21         row[4] = self.zoom_scale
22         row[1] = thumbnail
23-        gtk.gdk.threads_leave()
24 
25     def on_window_size_request(self, window, event):
26         """Main Window resize - workaround for autosetting of
27@@ -1079,7 +1077,6 @@ class PDF_Renderer(threading.Thread,gobj
28 
29 def main():
30     """This function starts PdfShuffler"""
31-    gtk.gdk.threads_init()
32     gobject.threads_init()
33     PdfShuffler()
34     gtk.main()
Note: See TracBrowser for help on using the repository browser.