Searching for the meaning of gcmodule.c assert:`gc->gc. gc_refs ==GC_REACHABLE'

Discussion in 'Python' started by David Helgason, Nov 13, 2003.

  1. I am embedding python on Mac OSX (jaguar + panther) using
    boost::python. It works like a treat, but when using a python framework
    with asserts compiled in, I sometimes get an assert from gcmodule.c,
    line 215 when compiling a script.

    Modules/gcmodule.c:215: failed asserrtion `gc->gc.gc_refs ==
    GC_REACHABLE'

    This is maybe the third script I compile, so the python environment
    should still be very clean.

    I tried reading the code in gcmodule.c but don't understand what the
    assert is warning me about or what is wrong here. Since I'm embedding
    python I suspect that I'm doing something wrong with reference
    counting, but in a ref-counted world that would either lead to leaks or
    crashes. Can wrong ref-counting confuse the garbage collector so badly
    that it asserts?

    Since I don't really need the garbage collector I've tried disabling it
    from python, and that fixes the problem. Only I'm worried that I've
    just managed to hide a bug, not remove it.

    I would be infinitly thankful if anyone could point me in a general
    direction as to what the problem might be.


    David Helgason
    --
    Over the Edge Entertainments
     
    David Helgason, Nov 13, 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. Edward K. Ream

    A new view of gcmodule.c

    Edward K. Ream, Jul 10, 2003, in forum: Python
    Replies:
    1
    Views:
    351
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jul 10, 2003
  2. Robert Brewer
    Replies:
    1
    Views:
    517
    bsmith
    Nov 7, 2004
  3. alexLIGO
    Replies:
    2
    Views:
    805
    Tim Peters
    Sep 9, 2005
  4. Alex Vinokur

    assert(x) and '#define ASSERT(x) assert(x)'

    Alex Vinokur, Nov 25, 2004, in forum: C Programming
    Replies:
    5
    Views:
    956
    Keith Thompson
    Nov 25, 2004
  5. stuffduff
    Replies:
    1
    Views:
    396
    stuffduff
    Jun 20, 2007
Loading...

Share This Page