Bug#563140: application freezes in presentation mode if gtk.gdk.threads_init is called

Peter Ward peteraward at gmail.com
Thu Dec 31 09:38:31 UTC 2009


Package: python-evince
Version: 2.28.0-5

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.


import gtk
gtk.gdk.threads_init() # commenting out this line makes the problem go away.

import evince

class EvinceWindow(gtk.Window):
    def __init__(self):
        super(EvinceWindow, self).__init__()

        document = evince.factory_get_document(
            'file:///home/flowblok/test.pdf',
        )

        view = evince.View()
        view.set_document(document)
#        view.set_screen_dpi(96)
#        view.set_sizing_mode(evince.SIZING_BEST_FIT)
        view.set_presentation(True)

        scroll = gtk.ScrolledWindow()
        scroll.add(view)

        self.add(scroll)

if __name__ == '__main__':
    win = EvinceWindow()
    win.show_all()
    win.connect('destroy', gtk.main_quit)
    gtk.main()




-- System Information:
Debian Release: squeeze/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'unstable'),
(500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-evince depends on:
ii  libatk1.0-0             1.28.0-1         The ATK accessibility toolkit
ii  libc6                   2.10.2-2         GNU C Library: Shared libraries
ii  libcairo2               1.8.8-2          The Cairo 2D vector graphics libra
ii  libevince1              2.28.2-1         Document (postscript, pdf) renderi
ii  libfontconfig1          2.8.0-1          generic font configuration library
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  libglib2.0-0            2.23.0-1         The GLib library of C routines
ii  libgtk2.0-0             2.18.5-1         The GTK+ graphical user interface
ii  libpango1.0-0           1.26.2-1         Layout and rendering of internatio
ii  python                  2.5.4-5          An interactive high-level object-o
ii  python-gtk2             2.16.0-1         Python bindings for the GTK+ widge
ii  python-support          1.0.6            automated rebuilding support for P
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

python-evince recommends no packages.

python-evince suggests no packages.

-- no debconf information


--
Peter Ward
http://identi.ca/flowblok/
http://flowblok.selfip.net:8001/






More information about the pkg-gnome-maintainers mailing list