Artifacts Associated With Ticket 620735ffffffffffffffffffffffffffffffffff
Ticket change [7925580cb2] (rid 90076) by nobody on 2002-10-09 12:30:28:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This bug took quite a while to track down. It seems that during the initialization of the Tcl subsystems, a thread is created. The threadProc for this thread is the CalibrationThread routine. This thread enters an infinite loop at priority 11 and continues to run AFTER the Tcl DLL has been unloaded. This causes the process to crash. My suggestion on a fix is that at some point during the finalization of Tcl, TerminateThread be called on the saved thread handle for this thread. No ill effects should occur due to this thread being terminated. I believe it's in the variable "timeInfo.calibrationThread" in file "win/tclWinTime.c". JJM
- foundin initialized to: "obsolete: 8.4.0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "None"
- title initialized to: "Tcl crash after unload on Windows 2000"
- type initialized to: "Bug"
Ticket change [c8fc246f31] (rid 122205) by dkf on 2002-10-09 19:39:48:
- assignee changed to: "kennykb"
- subsystem changed to: "06. Time Measurement"
Ticket change [2263eaf410] (rid 130741) by nobody on 2002-10-09 19:51:28:
- icomment:
Logged In: NO After some thought, I believe a much cleaner solution would be to use SleepEx in the CalibrationThread routine (with the bAlertable flag set to TRUE) and then to send the thread a "deadly" APC via QueueUserAPC (portable to Win 95+ and Win NT4+). The APC routine should simply call ExitThread. The handle to pass to QueueUserAPC can be had from the variable "timeInfo.calibrationThread" in "win/tclWinTime.c". JJM
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [022bb15b83] (rid 119602) by kennykb on 2002-10-10 06:59:32:
- closedate changed to: "2002-10-09T23:59:32"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Better still is to set an event to ask the thread politely to exit, and let it do so. That's what the committed fix does.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"