After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 317374 - crash when adding a box that tried to pack itself
crash when adding a box that tried to pack itself
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-27 20:29 UTC by Gustavo Noronha (kov)
Modified: 2005-10-09 11:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Gustavo Noronha (kov) 2005-09-27 20:29:26 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,
Comment 1 Gustavo Carneiro 2005-09-27 20:40:25 UTC
Not PyGTK's job to verify these constraints.
The program causes infinite recursion in gtk_box_forall.
Comment 2 Matthias Clasen 2005-09-28 04:30:38 UTC
Not GTK+'s job either, but the job of the programmer.
Comment 3 Gustavo Carneiro 2005-09-28 09:56:56 UTC
Indeed, PyGTK programmers are getting too spoiled ;)
Comment 4 Gustavo Noronha (kov) 2005-09-30 00:47:06 UTC
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.
Comment 5 Loïc Minier 2005-10-09 11:46:40 UTC
(And it shouldn't segfault.)