traces on nonexistent variables
Open219145ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 23 years ago
Descriptionplain2000-10-26 05:02:17
OriginalBugID: 875 RFE Version: 8.0.3 SubmitDate: '1998-11-25' LastModified: '2000-02-22' Severity: LOW Status: Assigned Submitter: pat ChangedBy: hobbs RelatedBugIDs: 752 4213 OS: All FixedDate: '2000-10-25' FixedInVersion: NA ClosedDate: '2000-10-25' This is another problem pointed out by Kevin Kenny in his Tcl/Tk Conference paper. Tcl and Tk are missing several pieces of introspection that are meeting to find memory leaks. Right now there are no Tcl commands that can be invoked to find out about traces on nonexistent variables Something like 'trace vunknown'. -- 02/22/2000 hobbs
msofer Ticket [219145ffff]: 1 change
[History diff]2001-08-30 21:03:49
dgpplain2002-07-06 03:55:30
Logged In: YES user_id=80530 1) Is this still correct? 2) Should there be a FR to fill in the missing introspection?
jenglishplain2003-01-18 10:00:22
Logged In: YES
user_id=68433
[trace vinfo] works on nonexistant variables:
% trace variable a w someProc
% trace vinfo a
{w someProc}
% info exists a
0
This works as far back as Tcl 7.4.
hobbsplain2003-01-18 10:07:34
Logged In: YES user_id=72656 I believe Kevin's point in this is that there is no ability to do a trace for the creation of unknown named vars, to see when they come into existence. This would be for either the perl behavior of default any non-preexistent var to "" or 0, or in a debugging context to trap errors.
dgpplain2003-01-18 10:48:04
Logged In: YES user_id=80530 ...and is there a way to retrieve the list of the names of the non-existent variables that have traces on them?
kennykbplain2003-01-21 22:17:11
Logged In: YES user_id=99768 [dgp] hit the nail on the head. I have actually had an app leak because it was establishing traces on non-existent global variables and forgetting to clean them up. There was no ready way to find out what nonexistent-variable traces were there, because the nonexistent variables don't show up in [info vars], and without the name, [trace vinfo] doesn't help. I'd like the feature that Jeff mentions, also, (although I'd not necessarily call it a 'trace', since it's more like a callback from [unknown], but that wasn't the point. How did this metamorphose from a feature request to a bug?
kennykb Ticket [219145ffff]: 3 changes
[History diff]2003-02-02 10:06:12
dkf Ticket [219145ffff]: 1 change
[History diff]2003-06-26 17:42:16
dgp Ticket [219145ffff]: 1 change
[History diff]2003-06-26 23:07:56
Log in (anonymous is fine) to add a comment.