[pygtk] signal emission problem with pygtk-2.11

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Thu Sep 20 18:53:53 WST 2007


On Qua, 2007-09-19 at 16:17 -0400, Mystilleef wrote:
> Hello,
> 
> PyGTK version 2.11 crashes my application whenever its "close-document"
> custom signal is emitted. The signal is emitted to alert objects
> connected to it to perform necessary cleanups before the application
> exits. This problem only occurs with version 2.11. Versions prior to
> 2.11 allow the signal to propagate without problems. I welcome any help.
> Let me know if you need more information.

Since PyGObject 2.14 a new memory management model is being used that
releases wrapped GObjects immediately, as soon as python code stops
using them in most cases, while before objects would typically hang
around for a while and only later would be freed.

As a side effect, the new PyGObject may start uncovering memory
management errors in extensions.  My guess is that you are including a
GObject in your signal which was already destroyed.

If your code is pure Python then it is likely that PyGObject or PyGtk is
at fault, in which case we welcome a minimal test case to help fix the
problem.  Thanks.

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert



More information about the pygtk mailing list