Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 711e1e441274129e72945f1d38a1a951489a7c68
Ticket: 218135ffffffffffffffffffffffffffffffffff
Tcl_Init fails if Tcl_FindExecutable wasn't called
User & Date: nobody on 2000-10-26 00:53:35
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2052 Bug
    Version: 8.1
    SubmitDate: '1999-05-12'
    LastModified: '1999-09-15'
    Severity: MED
    Status: Closed
    Submitter: pat
    ChangedBy: hobbs
    OS: SunOS
    OSVersion: 5.6
    Machine: Sparc
    FixedDate: '2000-10-25'
    ClosedDate: '1999-09-15'
    
    
    Name:
    Prasad A. Chodavarapu
    
    CustomShell:
    --threads-enabled
    
    ReproducibleScript:
    #include <tcl.h>
        #include <iostream.h>
        #include <assert.h>
        
        int main(int argc, char* argv[]) {
          Tcl_Interp* _interp = Tcl_CreateInterp();
          assert(_interp);
          //Tcl_FindExecutable(argv[0]);//upto and incl. 8.1b2, tcl didn't need
        this
          if (Tcl_Init(_interp) == TCL_ERROR) {
            cerr << Tcl_GetStringFromObj(Tcl_GetObjResult(_interp),NULL) <<
        endl;
            return -1;
          }
          return 0;
        }
    
    ObservedBehavior:
    Upto and incl. tcl8.1b2, we didn't need to necessarily call
        Tcl_FindExecutable(argv[0]) before calling Tcl_FindExecutable(argv[0])
        In tcl8.1 final release, Tcl_Init fails saying it cannot find init.tcl
        in the directory list {empty} even though TCL_LIBRARY environment
        variable is 
        correctly set to the directory where init.tcl resides.
        
        basically, Tcl_Init is ignoring the value of TCL_LIBRARY unless
        Tcl_FindExecutable(argv[0]) has been called. This is undesirable and not
        backwards incompatible.
    
    DesiredBehavior:
    As in previous versions, if TCL_LIBRARY is set, we shouldn't need to
        call Tcl_FindExecutable(argv[0]) before calling Tcl_Init(_interp)
    
    
    
    This change was made because without it, problems with encoding
    could occur.  While not well doc'ed this isn't a bug.  We are
    looking into maybe improving this for 8.3. 
    -- 09/15/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.1"
  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: "Tcl_Init fails if Tcl_FindExecutable wasn't called"
  11. type changed to: "Bug"