Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 217d3c11addcc4daa3b9f98ee81bdb1732b7bd11
Ticket: 218364ffffffffffffffffffffffffffffffffff
write traces on ::errorInfo screw up the traceback mechanism
User & Date: nobody on 2000-10-26 00:56:44
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 4189 Bug
    Version: 8.3
    SubmitDate: '2000-02-16'
    LastModified: '2000-04-03'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: All
    FixedDate: '2000-10-25'
    ClosedDate: '2000-04-03'
    
    
    Name:
    Alexandre Ferrieux
    
    Comments:
    I discovered that while trying to implement a 'substituted trace'
        utility (as described earlier in an RFE).
        To do that in pure Tcl, I'd use [info level 0] from within a write trace
        on ::errorInfo. This way I'd get the actual parameters of all the calls
        on the stack trace instead of the stupid unsubstituted source exceprt
        (try debugging a recursive proc with that...).
    
        Except today I can't due to the bug just reported.
    
    ReproducibleScript:
    trace variable ::errorInfo w tt
    proc tt args {#donothing}
    
    # from now on , when an error bursts the ::errorInfo contains only the outermost 'while executing'
    proc a {} b
    proc b {} c
    proc c {} d
    proc d {} e
    a
    invalid command name "e"
    puts $::errorInfo
    invalid command name "e"
        while executing
    "a"
    
    DesiredBehavior:
    A write trace doing nothing should be transparent !!!
    
    
    
    Without the trace this is:
    
    invalid command name "e"
        while executing
    "e"
        (procedure "d" line 1)
        invoked from within
    "d"
        (procedure "c" line 1)
        invoked from within
    "c"
        (procedure "b" line 1)
        invoked from within
    "b"
        (procedure "a" line 1)
        invoked from within
    "a"
        ("uplevel" body line 1)
        invoked from within
    "uplevel #0 a"
    
    The problem is that the errorInfo trace would get repeatedly
    called at each level.  Traces disable writing to the var in
    this case for safety (defined behavior). 
    -- 04/03/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "07. Variables"
  10. title changed to:
    write traces on ::errorInfo screw up the traceback mechanism
    
  11. type changed to: "Bug"