[ python-Bugs-1257960 ] gen_send_ex: Assertion `f->f_back != ((void *)0)' failed.
SourceForge.net
noreply at sourceforge.net
Sat Aug 13 05:29:21 CEST 2005
Bugs item #1257960, was opened at 2005-08-12 19:20
Message generated for change (Comment added) made by pje
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257960&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 8
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Phillip J. Eby (pje)
Summary: gen_send_ex: Assertion `f->f_back != ((void *)0)' failed.
Initial Comment:
Triggering is trival. Create a script that contains:
def f():
yield 1
g = f()
Run with a debug version of Python:
python: ../Objects/genobject.c:85: gen_send_ex:
Assertion `f->f_back != ((void *)0)' failed.
Aborted (core dumped)
----------------------------------------------------------------------
>Comment By: Phillip J. Eby (pje)
Date: 2005-08-13 03:29
Message:
Logged In: YES
user_id=56214
Sadly, this is not the cause of the IDLE problem, because
it's the assert that's wrong here. The problem that's
occurring is that f->f_back is NULL because the final
garbage collection at shutdown is occurring with a NULL
tstate->frame. Changing the assert to check that
f->f_back==tstate->frame makes the (meaningless) error go away.
Basically, the problem here is because this code used to be
the iternext routine, and it was never called by the GC.
Now, generators are closed when they are garbage collected,
so they can be executed during interpreter shutdown.
I've checked in a corrected assertion.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2005-08-13 00:09
Message:
Logged In: YES
user_id=80475
I believe this is related to IDLE crash that I've been seeing.
The problem did not occur just before the checkin:
cvs up -D "2005-08-01 18:00"
But emerged immediately after:
cvs up -D "2005-08-01 21:00"
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257960&group_id=5470
More information about the Python-bugs-list
mailing list