The problem you describe sounds like it might be related to this infamous PyGTK bug:

https://bugzilla.gnome.org/show_bug.cgi?id=546802

In our tests the problems show up when a Python object that participates in a cycle is referenced only through a GTK widget. When GC takes place, Python's cycle-breaker incorrectly concludes that the whole cycle is unreachable and runs tp_clear on all objects. The objects are, of course, still reachable through PyGTK, and unfortunately now quite broken.

A number of workarounds are available: simply access the widget's __dict__, which forces it to switch to a different reference-counting strategy. Or store a reference to your object in a global variable or container.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to