hi,
In moblin-media thumbnail_creator.py
The __load_place_holder function held tc_gdk_lock and then call
self.__append function which will also try to hold the same lock.

This patch fixes this deadlock issue.

--- thumbnail_creator.py.ori    2008-08-06 07:36:35.000000000 +0000
+++ thumbnail_creator.py        2008-08-06 07:47:27.000000000 +0000
@@ -242,15 +242,15 @@
         if not level:
             level = 7.5
         width = int(level * 20)
-        with tc_gdk_lock:
-            if self.__thumbnail_view.haveThumbnail(imgfile, mtime, False):
-                # A placeholder has already been appended to the model, so just
-                # update the placeholder pixbuf
-                pb = pb.scale_simple(width, width, gtk.gdk.INTERP_BILINEAR)
+        if self.__thumbnail_view.haveThumbnail(imgfile, mtime, False):
+            # A placeholder has already been appended to the model, so just
+            # update the placeholder pixbuf
+            pb = pb.scale_simple(width, width, gtk.gdk.INTERP_BILINEAR)
+            with tc_gdk_lock:
                 self.__thumbnail_view.updateThumbnail(imgfile, mtime,
pb, '', False)
-            else:
-                pb = pb.scale_simple(width, width, gtk.gdk.INTERP_BILINEAR)
-                self.__append(imgfile, pb, MediaType, mtime,
filesize, '', False)
+        else:
+            pb = pb.scale_simple(width, width, gtk.gdk.INTERP_BILINEAR)
+            self.__append(imgfile, pb, MediaType, mtime, filesize, '', False)

     def __load_from_cache(self, imgdir, imgfile, MediaType, mtime, filesize):
         """Given a path to an image file, try to find that file in the

Regards,
Axel

_______________________________________________
dev mailing list
[email protected]
https://www.moblin.org/mailman/listinfo/dev

Reply via email to