Skip to content
Tcl Source Code History Of Ticket 1911919fffffffff
Login

History Of Ticket 1911919fffffffff

Artifacts Associated With Ticket 1911919fffffffff

  1. Ticket change [0934149b03] (rid 89679) by juliannoble on 2008-03-11 14:52:25:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When a trace handler command for a variable trace on an unset operation reinstalls the same unset trace - this causes trouble when the corresponding namespace is deleted.
      The handler is called multiple times - causing large (multi-second) delays in the script.
      
      This behaviour didn't occur in  Tcl 8.5a7 or 8.4  but does occur in 8.5b1, 8.5.0 & 8.5.2.b1 
      
      
      namespace eval refs { 
      } 
      for {set i 0} {$i < 10} {incr i} { 
              set refname ::refs::$i 
              trace add variable $refname {read write unset} [list ::tracehandler] 
      } 
      
      proc ::tracehandler {args} { 
              #lassign [lrange $args end-2 end] vref vidx op 
              foreach {vref vidx op} [lrange $args end-2 end] {break} 
              switch -- $op { 
                      write { 
                              error "write failed. This reference cannot be treated as a 
      variable" 
                      } 
                      unset { 
                              trace add variable $vref {read write unset} [concat ::tracehandler 
      $args] 
      
      
                              #according to man page - errors in unset traces are ignored - so 
      this is not useful: 
                              #error "cannot unset. This reference cannot be treated as a 
      variable" 
                      } 
                      read { 
                              error "read failed. This reference cannot be treated as a variable" 
                      } 
              } 
              return 
      } 
      puts stdout "===>[time {namespace delete ::refs}]<===" 
      
      
      
    4. foundin initialized to: "obsolete: 8.5.2"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "juliannoble"
    10. subsystem initialized to: "46. Traces"
    11. title initialized to:
      namespace delete trouble with unset variable traces
      
    12. type initialized to: "Bug"
  2. Ticket change [5e31149357] (rid 115593) by juliannoble on 2008-03-11 21:53:57:

    1. assignee changed to: "msofer"
  3. Ticket change [cec871d9c6] (rid 96108) by msofer on 2008-03-12 00:24:46:

    1. closedate changed to: "2008-03-11T17:24:46"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      The problem was caused by unset traces during namespace delete NOT being called with a fully qualified name.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"