After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606028 - application freezes in presentation mode if gtk.gdk.threads_init is called
application freezes in presentation mode if gtk.gdk.threads_init is called
Status: RESOLVED NOTABUG
Product: gnome-python-desktop
Classification: Deprecated
Component: evince
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-04 16:19 UTC by Josselin Mouette
Modified: 2010-02-11 18:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (708 bytes, text/x-python)
2010-01-04 16:19 UTC, Josselin Mouette
Details

Description Josselin Mouette 2010-01-04 16:19:50 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.)
Comment 1 Gian Mario Tagliaretti 2010-01-04 16:33:53 UTC
Josselin I cannot reproduce the freeze, turning the mouse wheel or clicking the mouse left button change the page.
Comment 2 Josselin Mouette 2010-01-04 16:52:02 UTC
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?
Comment 3 Gian Mario Tagliaretti 2010-01-04 17:04:24 UTC
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.
Comment 4 Josselin Mouette 2010-01-05 08:40:34 UTC
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. :(”
Comment 5 Gian Mario Tagliaretti 2010-01-05 08:48:39 UTC
This is how it works:

http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp

Sorry that you have to copy/paste :)
Comment 6 Josselin Mouette 2010-02-11 18:33:12 UTC
Apparently this answer was enough :)