Folks,
I'm no longer able to run PyGtk scripts from gdb under some circumstances.
I am using the CVS HEAD of glib, atk, pango, gtk+ and pygtk. The following
simple Python script works fine when run from gdb:
#!/usr/bin/env python
import gtk
w = gtk.Window()
w.connect("destroy", gtk.mainquit)
#lbl = gtk.Label("hi")
#w.add(lbl)
w.show_all()
gtk.mainloop()
with the following output:
(gdb) r basic.py
Starting program: /usr/local/bin/python basic.py
[New Thread 1024 (LWP 19044)]
Gtk-Message: YOU ARE USING THE DEVEL BRANCH 1.3.x OF GTK+ WHICH IS CURRENTLY
UNDER HEAVY DEVELOPMENT AND FREQUENTLY INTRODUCES INSTABILITIES. if you don't know why you are getting this, you probably want to use the stable branch which can be retrieved from
ftp://ftp.gtk.org/pub/gtk/v1.2/ or via CVS with
cvs checkout -r glib-1-2 glib; cvs checkout -r gtk-1-2 gtk+
Program exited normally.
If I uncomment the two lines involving lbl, however, I get this mess:
(gdb) r basic.py
Starting program: /usr/local/bin/python basic.py
[New Thread 1024 (LWP 19127)]
Gtk-Message: YOU ARE USING THE DEVEL BRANCH 1.3.x OF GTK+ WHICH IS CURRENTLY
UNDER HEAVY DEVELOPMENT AND FREQUENTLY INTRODUCES INSTABILITIES. if you don't know why you are getting this, you probably want to use the stable branch which can be retrieved from
ftp://ftp.gtk.org/pub/gtk/v1.2/ or via CVS with
cvs checkout -r glib-1-2 glib; cvs checkout -r gtk-1-2 gtk+
basic.py (pid:19127): GRuntime-CRITICAL **: file gparamspecs.c: line 1687 (g_param_spec_float): assertion `default_value >= minimum && default_value <= maximum' failed
basic.py (pid:19127): GRuntime-CRITICAL **: file gobject.c: line 270 (g_object_class_install_property): assertion `G_IS_PARAM_SPEC (pspec)' failed
basic.py (pid:19127): ** WARNING **: Couldn't load font "Sans -2.09715e+06" falling back to "Sans -2.09715e+06"
basic.py (pid:19127): ** WARNING **: Couldn't load font "Sans -2.09715e+06" falling back to "Sans -2.09715e+06"
basic.py (pid:19127): ** WARNING **: All font failbacks failed!!!!
Program exited with code 01.
If I change the Label to an EventBox, everything works, presumably because
no font rendering is involved. Also when I run the script from the bash
prompt it works as expected (no Gtk warnings). The equivalent C program:
#include
Skip Montanaro wrote:
Folks,
I'm no longer able to run PyGtk scripts from gdb under some circumstances. I am using the CVS HEAD of glib, atk, pango, gtk+ and pygtk. The following simple Python script works fine when run from gdb:
#!/usr/bin/env python
import gtk
w = gtk.Window() w.connect("destroy", gtk.mainquit) #lbl = gtk.Label("hi") #w.add(lbl)
w.show_all() gtk.mainloop()
with the following output:
(gdb) r basic.py Starting program: /usr/local/bin/python basic.py [New Thread 1024 (LWP 19044)] Gtk-Message: YOU ARE USING THE DEVEL BRANCH 1.3.x OF GTK+ WHICH IS CURRENTLY UNDER HEAVY DEVELOPMENT AND FREQUENTLY INTRODUCES INSTABILITIES. if you don't know why you are getting this, you probably want to use the stable branch which can be retrieved from ftp://ftp.gtk.org/pub/gtk/v1.2/ or via CVS with cvs checkout -r glib-1-2 glib; cvs checkout -r gtk-1-2 gtk+
Just curious: does the proposed stable branch show the same behaviour ? If so, I'd suggest to ask the GTK guys for help. If not, then perhaps you have to rebuild the Python extensions involved and make sure that they match the Python version you are using. What you're seeing looks like there are some buffer overruns going on... I've never seen such a strange font name ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
participants (2)
-
M.-A. Lemburg
-
Skip Montanaro