GNOME Bugzilla – Bug 317374
crash when adding a box that tried to pack itself
Last modified: 2005-10-09 11:46:40 UTC
Distribution/Version: Debian unstable/experimental ---------------------------- Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk >>> win = gtk.Window() >>> vbox = gtk.VBox() >>> vbox.pack_start(vbox) __main__:1: GtkWarning: gtk_widget_set_parent: assertion `widget != parent' failed >>> win.add(vbox) Segmentation Fault ---------------------------- Originally reported to Debian by Pietro Giorgianni: http://bugs.debian.org/279879 Confirmed with pygtk 2.6.3 and 2.8.0. See ya,
Not PyGTK's job to verify these constraints. The program causes infinite recursion in gtk_box_forall.
Not GTK+'s job either, but the job of the programmer.
Indeed, PyGTK programmers are getting too spoiled ;)
I agree, but wouldn't it be nice if pygtk could detect this and raise an exception? I believe raising an exception when widget != parent fails would be pretty nice.
(And it shouldn't segfault.)