GNOME Bugzilla – Bug 606028
application freezes in presentation mode if gtk.gdk.threads_init is called
Last modified: 2010-02-11 18:33:12 UTC
Created attachment 150782 [details] Test case [ Original report by Peter Ward: http://bugs.debian.org/563140 ] I'm trying to write an application which makes use of both gstreamer and python-evince - in order to get gstreamer to work properly, I need to call gtk.gdk.threads_init() when importing modules. This unexpectedly causes problems when using a evince.View widget in presentation mode. I have included below a short program which demonstrates the problem - I can reproduce this bug in both my desktop and my laptop. (Note from Joss: I can perfectly reproduce it as well.)
Josselin I cannot reproduce the freeze, turning the mouse wheel or clicking the mouse left button change the page.
A few iterations of changing pages and resizing the window makes the thing easily reproducible here. Is there some debugging information that you could use, maybe a gdb backtrace at the time of the freeze?
Joss use gobject.threads_init() instead of gtk.gdk.threads_init(), you should use the latter if you have to touch the GUI from another thread.
Quoting the original reporter (*sigh*, I love copypasta): “Okay, so I suppose the real question now is why I need the gtk.gdk.threads_init(). I was experiencing freezes / crashes when I added the video sink into my DrawingArea, which I believe was due to the issue here: http://sourceforge.net/mailarchive/forum.php?thread_name=1258400785.3124.106.camel%40fancy&forum_name=gstreamer-devel As you can see, the recommended solution there was to use the GDK lock, which obviously conflicts with the solution upstream have supplied. :(”
This is how it works: http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp Sorry that you have to copy/paste :)
Apparently this answer was enough :)