OriginalBugID: 5494 Bug
OS: All Windows
There are Tk_ routines that can reasonably be called before Tk_Init (and thus Tcl_InitStubs) is called. In particular Tk_GetNumMainWindows (should return zero) and Tk_MainWindow (explicitly documented as callable on non-Tk interpreters), perhaps there are more.
When Tk is built using TCL stubs (always the case on Windows) these routines will crash while trying to access Tcl_GetThreadData trough the (NULL) Tcl stub table.
The patch for Bug DB ticket#2269 solves this problem in another context and could be adapted. (explicitly check for tclStubsPtr==NULL)