tclsh80.exe and wish80.exe require the registry value to be
Closed / Fixed218545ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:01:59
OriginalBugID: 978 Bug
Version: 8.0.4
SubmitDate: '1998-12-15'
LastModified: '1999-02-02'
Severity: SER
Status: Released
Submitter: welch
ChangedBy: stanton
OS: Windows NT
OSVersion: 4.0SP3
Machine: X86
FixedDate: '1999-02-02'
FixedInVersion: 8.0.5
ClosedDate: '2000-10-25'
Name:
Jan Nijtmans
ReproducibleScript:
Unset the registry value and try to run tclsh80.exe or wish80.exe.
An error message will result that no suitable init.tcl can be found,
even though the directory list is correct and there is a valid
"init.tcl" file there.
ObservedBehavior:
Although tclScriptInit.h provides alternative directories to search for
init.tcl, this doesn't work. The probem is Windows specific, and
comes from the following chain:
- If the registry value is not set, tclWinInit.c doesn't set the
variable tcl_libPath.
- In init.tcl, if tcl_libPath is not set, __dir will not be set
- As a result the "unset __dir" will fail.
- This will drive the initialization script to decide that this
"init.tcl" is invalid.
Patch:
*** tclWinInit.c.origFri Oct 23 23:21:59 1998
--- tclWinInit.cTue Dec 15 11:19:04 1998
***************
*** 220,225 ****
--- 220,227 ----
Tcl_SetVar(interp, "tcl_pkgPath", Tcl_JoinPath(2, argv, &ds),
TCL_GLOBAL_ONLY|TCL_LIST_ELEMENT);
}
+ } else {
+ Tcl_SetVar(interp, "tcl_pkgPath", "", TCL_GLOBAL_ONLY);
}
/*
*** init.tcl.origThu Nov 12 06:54:01 1998
--- init.tclTue Dec 15 11:17:30 1998
***************
*** 53,59 ****
}
}
}
! unset __dir
# Windows specific initialization to handle case isses with envars
--- 53,59 ----
}
}
}
! catch {unset __dir}
# Windows specific initialization to handle case isses with envars
PatchFiles:
tclWinInit.c init.tcl
In fact, applying either the patch for tclWinInit.c either the patch for
init.tcl solves the problem, because the above described chain is broken.
But applying both would be safest.
This bug was already present in Tcl8.0.3 as well. It was reported to me
by Dennis LaBelle, thinking it was a plus-patch specific bug. But this time
it wasn't my fault :-) For Freewrap it was fatal.
welch Closed ticket [218545ffff].
[History diff]2000-10-26 08:24:13
dgp Ticket [218545ffff]: 3 changes
[History diff]2001-04-16 23:27:55
Log in (anonymous is fine) to add a comment.