Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ef31abc9591ad0c74cb1afd50ab2025d51f1fb4a
Ticket: 218545ffffffffffffffffffffffffffffffffff
tclsh80.exe and wish80.exe require the registry value to be
User & Date: nobody on 2000-10-26 01:01:59
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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.
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    tclsh80.exe and wish80.exe require the registry value to be 
    
  11. type changed to: "Bug"