Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_FSEvalFile in VFS fails to reset [info script]

Closed1249172fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-08-01 02:33:35
When using tclkit build from the core-8-4-branch, a "package require Tk" 
results in a subsequent "info script" invocaion returning an incorrect value.

For example:
 puts stderr "before = [info script]"
 package require Tk
 puts stderr "after  = [info script]"

returns:
  before = tst1.tcl
  after  = /usr/local/bin/tclkitA/lib/tcl8.4/auto.tcl

The problem only occurs with tclkit built from the core-8-4-branch. It doesn't 
occur with wish built from core-8-4-branch nor wish built the HEAD. It also 
seems to occur only with Tk (both the Aqua and X11 versions) but not with 
any of the other packages inTclkit (http, Itcl, Mk4tcl or vfs).
stevel Ticket [1249172fff]: 1 change [History diff]2005-08-01 09:36:20
dgpplain2005-08-01 21:58:57
Logged In: YES 
user_id=80530


Please replace [package require Tk]
in your demo with
[catch tcl_findLibrary], and see
if the problem is still present.
stevelplain2005-08-02 06:54:23
Logged In: YES 
user_id=2460

Confirmed - the problem still persists
dgpplain2005-08-02 12:18:21
Logged In: YES 
user_id=80530


Good.  That should take Tk out
of the picture.

Next, please try:

[source [file join [info library] auto.tcl]]
stevelplain2005-08-02 15:16:46
Logged In: YES 
user_id=2460

confirmed - problem still persists.

BTW, you can get the tclkit for OSX that exhibits the behaviour via the link in this 
post - http://sourceforge.net/mailarchive/message.php?msg_id=12511812
dgpplain2005-08-02 20:55:27
Logged In: YES 
user_id=80530


hmmm... that suggests a fault
in Tcl_FSEvalFile() then.
dgp Ticket [1249172fff]: 1 change [History diff]2005-08-02 20:56:47
dgpplain2005-08-02 21:02:51
Logged In: YES 
user_id=80530


Are these failures in a thread-enabled Tcl?
dgpplain2005-08-02 22:06:39
Logged In: YES 
user_id=80530


I'm afraid I don't see how
the save/restore of
oldScriptFile within
Tcl_FSEvalFile() can go
wrong, unless there's some
real serious memory corruption
behind it.
stevelplain2005-08-03 07:02:53
Logged In: YES 
user_id=2460

It's not thread-enabled.
dgpplain2005-08-08 20:59:34
Logged In: YES 
user_id=80530


do I understand this has been resolved?
stevelplain2005-08-09 07:26:16
Logged In: YES 
user_id=2460

Yes - in so far that we have established that the problem isn't in Tcl (i.e. it is 
either in one of the tclkit extensions, or triggered by the tclkit build process)
Log in (anonymous is fine) to add a comment.