Artifacts Associated With Ticket 1911919fffffffffffffffffffffffffffffffff
Ticket change [0934149b03] (rid 89679) by juliannoble on 2008-03-11 14:52:25:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- 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}]<===" - foundin initialized to: "obsolete: 8.5.2"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "juliannoble"
- subsystem initialized to: "46. Traces"
- title initialized to:
namespace delete trouble with unset variable traces
- type initialized to: "Bug"
Ticket change [5e31149357] (rid 115593) by juliannoble on 2008-03-11 21:53:57:
- assignee changed to: "msofer"
Ticket change [cec871d9c6] (rid 96108) by msofer on 2008-03-12 00:24:46:
- closedate changed to: "2008-03-11T17:24:46"
- closer changed to: "msofer"
- 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.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"