connection != NULL assertion in dbus-python

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Dec 11 15:59:55 PST 2006


You may be pleased to know that I've turned _dbus_bindings into multiple
translation units, so the -impl.h weirdness has gone away.

The connection != NULL assertion failure looks extremely suspicious -
the Connection seems to be getting dealloc'ed twice! Did you still see
the assertion failure with the patch applied? I've started adding
some Python-aware assertions which will print a Python stack trace before
aborting, which may help with things like this.

On Mon, 11 Dec 2006 at 17:06:48 -0500, John (J5) Palmieri wrote:
> Core was generated by `/usr/bin/python /usr/bin/sugar-shell'.
> Program terminated with signal 11, Segmentation fault.
> #0  PyType_IsSubtype (a=0x0, b=0x81da68c) at Objects/typeobject.c:821
> 821		if (!(a->tp_flags & Py_TPFLAGS_HAVE_CLASS))
> (gdb) where
> #0  PyType_IsSubtype (a=0x0, b=0x81da68c) at Objects/typeobject.c:821

That a=0x0 doesn't look good... rummaging through the source for the
offending functions, it seems a __new__ or tp_new is somehow returning an
object with ob_type == NULL. I can only assume some data corruption is
going on :-(

After some fighting with the Fedora/OLPC environment I've reproduced
both the assertion failure and the crash, so I'll have a look in
detail tomorrow.

	Simon


More information about the dbus mailing list