First off, not all extensions are thread-safe, and Expect has never been vetted for that.  Also, there are some issues with standard channel handling behavior with threads on Windows.  I suspect the problem is the former, but to test the latter, just add:
 
 set fake_stdin [open NUL: r]
 set fake_stdout [open NUL: w]
 set fake_stderr [open NUL: w]
to the "thread::create" script.

  Jeff Hobbs, The Tcl Guy, http://www.ActiveState.com/

-----Original Message-----
From: expect-win32-bounces@lists.sourceforge.net [mailto:expect-win32-bounces@lists.sourceforge.net] On Behalf Of qiang zheng
Sent: September 21, 2006 11:36 AM
To: expect-win32@lists.sourceforge.net
Subject: [Expect-win32] Expect with Thread crash

Hi,

When I load Expect package in another new created thread, tclsh crash during loading the expect543.dll in the child-thread.

#!/bin/sh
exec tclsh "$0" ${1+"$@"}
package require Thread
package require Expect

set tid [thread::create  {
    package require Expect
    thread::wait
}]


I used ActiveTcl8.4.13.0, which includes Expect5.43 and Thread2.6.3
My PC is AMD Athlon64 3200+ with WinXP-SP2.

I had already replaced the dbghelp.dll with the version of 6.4.7.2.(instead of 5.1.2600 )

Help...