PyThreadState_Get: no current thread -- building debug libraries

Mike Fletcher mfletch at tpresence.com
Wed Sep 27 21:50:54 CEST 2000


To debug a persistent, nasty crash (reported earlier here), I'm starting
into building debug versions for all the libraries I'm using (mxTextTools,
metakit, m2crypto, wxPython, Stackless).  (All this is on NT 4.0sp5 VC++6sp3

I figured the best way to start would be to build a vanilla 1.5.2 Python
(i.e. not Stackless) in debug mode from the VC++ IDE.  Fine, works as
expected, can import modules and generally tool around as expected.

So, now, I build a debug version of mxTextTools (using a distutils setup
script, still using vanilla 1.5.2), specifying setup build --debug install.
This does create a mxTextTools_d.pyd and puts it in my Python directory.
However, when I import TextTools.TextTools, I get the following error:

S:\Python-1.5.2\PCbuild>python_d
Python 1.5.2 (#0, Sep 27 2000, 15:43:48) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import TextTools.TextTools
Fatal Python error: PyThreadState_Get: no current thread

So why am I bothering you all with this?  Well, mostly 'cause I haven't a
clue why this is showing up, nor what the fix would look like.  More
curiously, this is one of the errors I had show up occasionally as part of
the persistent, nasty, crashes I'm doing all this stuff to fix.  So, any
gurus out there willing to tell me how _PyThreadState_Current == NULL in a
running interpreter?  I'm assuming that it's something like a DLL version
mismatch, but not really sure what DLL would be causing the problem.

Thoughts appreciated,
Mike
__________________________________
 Mike C. Fletcher
 Designer, VR Plumber
 http://members.home.com/mcfletch




More information about the Python-list mailing list