Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-11-16
04:39 • Ticket [1065378fff] cannot delete trace status still Closed with 5 other cha... artifact: 217d2face6 user: dgp
04:10 • Ticket [1065378fff]: 4 changes artifact: b29ceb08dc user: dgp
04:10 • Add attachment 1065378.patch to ticket [1065378fff] artifact: 4a7a6a22cf user: dgp
04:10 • Ticket [1065378fff] cannot delete trace status still Closed with 8 other cha... artifact: 93b02fc7dd user: dgp
04:10 • Closed ticket [1065378fff]. artifact: cfd140c318 user: dgp
03:17 • Ticket [1065378fff]: 6 changes artifact: 03b7079012 user: dgp
03:17 • Open ticket [1065378fff]. artifact: e40dd3f292 user: dgp
03:00 • Ticket [1065378fff]: 8 changes artifact: be3e03908c user: dgp
03:00 • Closed ticket [1065378fff]. artifact: 328ef26c59 user: dgp
2004-11-13
07:34 • Ticket [1065378fff]: 1 change artifact: 8d82b36b03 user: dgp
07:33 • Ticket [1065378fff]: 4 changes artifact: eecd672118 user: dgp
06:04 • Ticket [1065378fff]: 3 changes artifact: bbf72d35fa user: dgp
2004-11-12
19:00 • New ticket [1065378fff]. artifact: 7ffbf1a5ca user: keithv

cannot delete trace

Closed / Fixed1065378fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-11-12 19:00:52
I'm using 8.4.7 and I find that I cannot delete a trace 
using "trace remove variable" while I can with the soon-
to-be-obsolete "trace vdelete".

Example script:
proc Trace {var1 var2 op} {puts "in 
Trace: '$var1' '$var2' '$op'"}
trace variable myVar w Trace
trace info variable myVar                       ;# There it is

trace remove variable myVar w Trace             ;# error 
must be "write"
trace remove variable myVar write Trace
trace info variable myVar                       ;# Still there

trace vdelete myVar w Trace                     ;# works
trace info variable myVar                       ;# gone

Keith
dgp Ticket [1065378fff]: 3 changes [History diff]2004-11-13 06:04:14
dgpplain2004-11-13 07:33:47
Logged In: YES 
user_id=80530


confirmed on the core-8.4
tip of development and on
the HEAD.

This likely traces back to
a mistaken implementation
choice that kept support for
the old subcommands in place
with a separate set of code from
the new subcommands, rather
than doing it wrapper style
with the old name ultimately 
invoking the new implementation.

Thanks for the bug report.
Until a fix shows up, work around
it by balancing [trace variable] with
[trace vdelete] and [trace add] with
[trace remove].
dgp Ticket [1065378fff]: 1 change [History diff]2004-11-13 07:34:36
dgp Closed ticket [1065378fff]. [History diff]2004-11-16 03:00:51
dgpplain2004-11-16 03:00:52
Logged In: YES 
user_id=80530


after looking into this, it seems that
because the [trace] syntax changed
at the same time that the acceptable
values for variable trace operations
changed (rwua -> read write unset array),
the consequence is the two forms of
variable traces are not interchangeable.
(They differ notably in the ops arguments
passed to the trace itself).  So, the only
viable workaround it to just be consistent.
Either stick with the old form, or convert
fully to the new form.  Don't try to mix and
match.
dgp Open ticket [1065378fff]. [History diff]2004-11-16 03:17:48
dgpplain2004-11-16 03:17:49
Logged In: YES 
user_id=80530

oops.  spoke too soon.  Got a fix
coming after all.
dgp Closed ticket [1065378fff]. [History diff]2004-11-16 04:10:09
dgpplain2004-11-16 04:10:10
Logged In: YES 
user_id=80530

Here's a patch.
dgpplain2004-11-16 04:10:13
File Added - 108897: 1065378.patch
dgpplain2004-11-16 04:39:06
Logged In: YES 
user_id=80530

fixed for 8.4.8 and 8.5a2.
Log in (anonymous is fine) to add a comment.

Attachments: