[pygtk] pygobject_new segfault

Hrvoje Niksic hrvoje.niksic at avl.com
Mon May 21 18:01:57 WST 2012


You need to call pygobject_init(-1, -1, -1) before using pygobject.  You 
also need to call Py_Initialize().  Also, since you're using gtk, and 
not just gdk, you should call gtk_init().

With the first three lines of main() changed to:

     gdk_init(&argc, &argv);
     Py_Initialize();
     pygobject_init(-1, -1, -1);

and with -lpython2.7 added to the compilation line, the test program no 
longer segfaults on startup.


More information about the pygtk mailing list