Overview
| Artifact ID: | 5cd2100413ba211178bfa48936885594e04eebb0 |
|---|---|
| Ticket: | 219324ffffffffffffffffffffffffffffffffff
(tcltest) ThreadErrorProc not always called |
| User & Date: | nobody on 2000-10-26 05:10:45 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 3957 Bug Version: 8.2.3 SubmitDate: '1999-12-29' LastModified: '2000-10-25' Severity: MED Status: UnAssn Submitter: techsupp OS: SunOS OSVersion: 5.6 Machine: Sun Ultra FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Peter Silsbee Extensions: With tcltest, none. Separately, Expect, Tk, tix. CustomShell: N/A Comments: Patch is tentative. I'm totally unfamiliar with Tcl source, and have basically no idea what side effects it might cause! ReproducibleScript: Command line: tcltest script.tcl script.tcl: set errorthread [testthread create] set cmd "proc errorHandler \{id ei\} \{\ puts \"This is my error procedure.\";\ puts \"The thread is \$id\";\ puts \"The errorInfo is <\$ei>\";\ }" testthread send $errorthread $cmd testthread send $errorthread "testthread errorproc errorHandler" puts "About to commit an error in non-waiting thread" testthread create "set nonexistent" set thread2 [testthread create] puts "About to commit an error in the thread that is waiting" testthread send $thread2 "set nonexistent" after 2000 puts "I survived to the end of the script" puts "The remaining threads are [testthread names]" ObservedBehavior: The procedure "errorHandler" is only called when an error occurs during "testthread create" script evaluation. When an error occurs during "testthread send" evaluation, ThreadErrorProc is never called. DesiredBehavior: ThreadErrorProc, hence errorHandler if registered, should be called on any thread error? Patch: *** generic/tclThreadTest.c.oldSat Oct 30 05:06:01 1999 --- generic/tclThreadTest.c.newWed Dec 29 10:27:35 1999 *************** *** 817,822 **** --- 817,830 ---- if (code != TCL_OK) { errorCode = Tcl_GetVar(interp, "errorCode", TCL_GLOBAL_ONLY); errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); + ThreadErrorProc(interp); + if (errorProcString != NULL) { + /* + * assume registered error handler can take care of things + */ + code = TCL_OK; + errorCode = errorInfo = NULL; + } } else { errorCode = errorInfo = NULL; } PatchFiles: tclThreadTest.c - foundin changed to: "final: 8.2.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "49. Threading"
- title changed to: "(tcltest) ThreadErrorProc not always called"
- type changed to: "Bug"