extra_ivars assersion failure

Discussion in 'Python' started by Ben Liblit, Aug 28, 2003.

  1. Ben Liblit

    Ben Liblit Guest

    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 h2def.py
    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.]

    Thanks!
    Ben Liblit, Aug 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    2,452
  2. Scott Wallace

    Logon Failure

    Scott Wallace, Oct 3, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    513
    Paul Todd
    Oct 6, 2003
  3. Liza K.

    test.provider load failure

    Liza K., Jan 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    645
    Liza K.
    Jan 14, 2004
  4. Ilias Lazaridis
    Replies:
    0
    Views:
    571
    Ilias Lazaridis
    Feb 1, 2005
  5. Replies:
    0
    Views:
    470
Loading...

Share This Page