My first python core dump!
Greg McFarlane
gregm at iname.com
Tue Aug 31 03:30:40 EDT 1999
It may be a bug in Tk, but it causes python to core dump.
First run this:
% python
Python 1.5.2 (#1, Aug 31 1999, 12:54:44) [GCC 2.9-gnupro-98r1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Tkinter
>>> root = Tkinter.Tk()
>>> root.tk.createcommand('debugEval', eval)
Then this:
% python
Python 1.5.2 (#1, Aug 30 1999, 18:06:40) [GCC 2.9-gnupro-98r1] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Tkinter
>>> root = Tkinter.Tk()
>>> root.tk.eval('send {tk #2} debugEval dir(Tkinter)')
Traceback (innermost last):
File "<stdin>", line 1, in ?
TclError: target application died
>>>
The first python dies with:
>>> Segmentation Fault (core dumped)
The first few lines of gdb the stack trace is:
#0 0x57d40 in PyDict_GetItem (op=0x0, key=0x41f2f8) at dictobject.c:314
#1 0x59bf4 in PyDict_GetItemString (v=0x0, key=0x2b2d10 "__builtins__")
at dictobject.c:1071
#2 0x63bb4 in builtin_eval (self=0x0, args=0x348dd0) at bltinmodule.c:732
#3 0x700ec in call_builtin (func=0x341080, arg=0x348dd0, kw=0x0)
at ceval.c:2359
#4 0x6fefc in PyEval_CallObjectWithKeywords (func=0x341080, arg=0x348dd0,
kw=0x0) at ceval.c:2324
#5 0xcbbc8 in PythonCmd (clientData=0x394180, interp=0x382c80, argc=2,
argv=0xefffde48) at ./_tkinter.c:1219
#6 0x21bd2c in TclInvokeStringCommand (clientData=0x389880, interp=0x382c80,
objc=2, objv=0x3ce538) at ./../generic/tclBasic.c:1743
It looks like the call to PyEval_GetGlobals() in builtin_eval() is
returning None, which means that the current_frame is NULL, which
means I don't know.
Can anyone reproduce this?
--
Greg McFarlane: INMS Telstra Australia (gregm at iname.com)
Today's forecast: Sunny, with occasional cloudy periods and a chance
of precipitation in some areas.
More information about the Python-list
mailing list