Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > extra_ivars assersion failure

Thread Tools

extra_ivars assersion failure

Ben Liblit
Posts: n/a
I'm having trouble subclassing a class from an extension module. When
Python processes my subclass definition, and before any instances are
created, it aborts with:

python: Objects/typeobject.c:872: extra_ivars:
Assertion `t_size >= b_size' failed.

The extension module is trying to coordinate no less than three different
object systems (GObject, CORBA, Python). Let me back up and explain
what's going on in there.

In the world of the GTK+ GObject system, I've got a GObject subclass.
(It's actually a subclass of BonoboObject, which in turn derives from
GObject.) I can write C code that instantiates this GObject-derived class
and all is well.

I'm wrapping these GObject instances inside Python objects using
and pygtk-codegen-2.0. The ".defs" file looks good: there's a
define-object construct with the right class name and parent class name.
The constructor is detected and wrapped correctly. In the ".override"
file I "import bonobo.Object as PyBonoboObject_Type", and everything
builds smoothly. I can write Python code that instantiates this wrapper
class and all is well.

What I cannot do is subclass this wrapper class in Python code. When I
try to, I get the diagnostic message reported earlier:

python: Objects/typeobject.c:872: extra_ivars: Assertion `t_size >=
b_size' failed.

Does anyone know what deeper problem this message is symptomatic of? What
am I doing wrong in my extension module that would allow it to work
correctly when the wrapper class is instantiated directly, but which would
cause this error when a subclass of the wrapper class is defined?

[I originally posted this message to the pygtk mailing list, as it
involves a number of their supporting tools. Folks on that list suggested
that I try asking in this forum instead.]


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Success Or Failure: There Is No Such Thing As Failure C Programming 0 01-06-2008 11:41 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
windows socket failure - still having trouble =?Utf-8?B?Q01Dcm9uYW4=?= Wireless Networking 2 10-03-2004 01:10 AM
let's try that again - windows socket failure =?Utf-8?B?Q01Dcm9uYW4=?= Wireless Networking 2 10-02-2004 09:06 AM
Re: 802.1x dhcp failure dpablo Wireless Networking 0 09-01-2004 12:03 AM