pywebkitgtk crashes python if gtk.gdk.threads_init() is not called

Bug #480398 reported by Mariano Guerra
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pywebkitgtk (Ubuntu)
New
Undecided
Unassigned

Bug Description

I wanted to see the docs of webkit so I started an interactive shell:

mariano@ganesha:~$ python
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webkit
>>> help(webkit)

GLib-ERROR **: The thread system is not yet initialized.
aborting...
Cancelado

woops, not good, then I read about the thread system not initialized and tried:

mariano@ganesha:~$ python
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> import webkit
>>> gtk.gdk.threads_init()
>>> help(webkit)

and it worked like a charm.

I thought that if webkit depends on the thread system being initialized then it should initialize it by itself, I went to the upstream repo and I found this:

http://code.google.com/p/pywebkitgtk/source/browse/trunk/webkit/webkitmodule.c#46

yep, they are initializing the thread system, now, what about ubuntu?

apt-get source python-webkit
tar -xzf pywebkitgtk_1.1.5.orig.tar.gz
vim pywebkitgtk-1.1.5/webkit/webkitmodule.c

nope, they are not doing those two lines...

recommendation: add those two lines :)

more info:

Description: Ubuntu 9.10
Release: 9.10

$ apt-cache policy python-webkit
python-webkit:
  Instalados: 1.1.5-1
  Candidato: 1.1.5-1
  Tabla de versión:
 *** 1.1.5-1 0
        500 http://ar.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Mariano Guerra (luismarianoguerra) wrote :

may I say that this also affects a software that doesn't do the inicialization, that also affect pylint (that crashes) and the documentation of the module.

PS: bump?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.