Public bug reported:

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://bitbucket.org/naviserver/naviserver/commits/d118a87689afe116ee3e618809a4b34f66a75379

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_THREAD_LIBRARY)] &&
        ..." line 11)
    invoked from within
"::apply {{dir} {
    if {[info exists ::env(TCL_THREAD_LIBRARY)] &&
        [file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} {
        source $::env(TCL_THREA..."
    ("package ifneeded Ttrace 2.8.2" script)
    invoked from within
"package require Ttrace"

** Affects: tclthread (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1821197

Title:
  ttrace not updated for errorInfo changes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tclthread/+bug/1821197/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to