ttrace not updated for errorInfo changes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tclthread (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I was given a Tcl program that uses ttrace to coordinate threads. It worked under Tcl8.4 but fails under 8.6 with the error message below.
After some investigation I found that Tcl changed its behavior with regard to the ::errorInfo and ::errorCode globals, no longer setting them at startup, but ttrace assumes them to be set. ttrace needs to be updated to account for this change.
The change is trivial, and I'll link to a patch that fixed the issue, checking for the variable before trying to access it. The only modification needed is a few lines in ttrace.tcl
Here's the URL of the patch:
https:/
Here's an example of the error:
Error from thread tid0x70eff460
can't read "::errorInfo": no such variable
while executing
"set ei $::errorInfo"
(procedure "ttrace::getentry" line 3)
invoked from within
"ttrace::getentry load $entry"
(procedure "script::_load" line 4)
invoked from within
"script::_$maker"
(procedure "getscript" line 14)
invoked from within
"getscript"
(procedure "::ttrace::update" line 10)
invoked from within
"::ttrace::update"
(lambda term "{dir} {
if {[info exists ::env(TCL_
..." line 11)
invoked from within
"::apply {{dir} {
if {[info exists ::env(TCL_
[file readable $::env(
source $::env(
("package ifneeded Ttrace 2.8.2" script)
invoked from within
"package require Ttrace"