Skip to content
Tcl Source Code History Of Ticket 599376ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 599376ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 599376ffffffffffffffffffffffffffffffffff

  1. Ticket change [fc46775f58] (rid 108208) by nobody on 2002-08-23 19:08:47:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Using TCL dynamic library tcl84.dll in our process. 
      The current dir is d:\xyz\some\dir ; have tcl source 
      script there named "tclExtSource.tcl".
      
      When called Tcl_EvalFile("tclExtSource.tcl");
      it fails saying "couldn't read file "tclExtSource.tcl": 
      no such file or directory"
      
      After investigation, it looks like there is bug in 
      following method in "tclWinFile.cpp"
      int TclpObjNormalizePath(interp, pathPtr, 
      nextCheckpoint)
          Tcl_Interp *interp;
          Tcl_Obj *pathPtr;
          int nextCheckpoint;
      {
      .....
      }
      
      Thanks.
      
      -Prashant Hedaoo
      [email protected]
      
    4. foundin initialized to: "obsolete: 8.4b2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "Tcl_EvalFile dosn't look in current dir"
    11. type initialized to: "Bug"
  2. Ticket change [0c347f0cf9] (rid 114137) by nobody on 2002-08-27 17:43:24:

    1. icomment:
      Logged In: NO 
      
      Please provide more detail on the "bug" you found in 
      tclWinFile.c.  In particular what were the inputs to the 
      function, what were the results and how did those 
      results differ from what you expected to see.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  3. Ticket change [69e0a28353] (rid 128053) by vincentdarley on 2002-08-28 19:46:18:

    1. closedate changed to: "2002-08-28T12:46:18"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Can't reproduce this without further information.
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. resolution changed to: "Works For Me"
    7. status changed to: "Pending"
    8. username: "vincentdarley"
  4. Ticket change [7eefe74f29] (rid 97490) by nobody on 2002-08-31 02:07:49:

    1. icomment:
      Logged In: NO 
      
      Test case:
      
      1. Create Test Tcl source sctipt ("tclTest.tcl") and put it in a dir "c:\some\dir"
      2. Create a program to use tcl84.dll (Beta 2) which calls Tcl_EvalFile( "tclTest.tcl") after changing current dir to 
      "C:\some\dir"
      
      Actual result:
      
      Tcl_EvalFile(..) fails. If you furthur probe, the TclpObjNormalizePath(...) returns path "C:\tclTest.tcl" instead of 
      "C:\some\dir\tclTest.tcl"
      
      -Prashant
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [175399c11e] (rid 122471) by andreas_kupries on 2002-08-31 02:16:01:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Step number 2 is the difficult one.
      Please provide your sources.
      Without these sources we might accidentially create an 
      application which does not exhibit the problem.
      Maybe your application initialization is wrong or something 
      which prevents the normalization code from working correctly.
      
      If your sources are to big, confidential, etc. reduce your code 
      to a minimal example still exhibiting the problem and submit 
      that.
      
      Is it possible for you to add your email address so that Vince 
      can talk to you more directly ?
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "andreas_kupries"
  6. Ticket change [bea4b72ec4] (rid 102109) by nobody on 2002-08-31 02:23:55:

    1. icomment:
      Logged In: NO 
      
      I will try to get you source code for step 2.
      
      Additional info :
      
      Tcl_EvalFile() worked fine till TCL 8.4 (Alfa 4) release.
      Broke in TCL 8.4 (Beta 1 and 2)
      
      My email : [email protected]
      
      -Prashant
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  7. Ticket change [bd5e1fa57b] (rid 101893) by nobody on 2002-08-31 07:12:59:

    1. icomment:
      Logged In: NO 
      
      Test case setup..............
      
      Prerequisite for building tcl84.lib and tcl84.dll binaries.
      Otherwise, program crashes due to NULL function pointer. Another bug in TCL code.
      
      1. Replace line# 86 -> NULL, by following line in ...\win\tclWin32Dll.cpp
          (BOOL (WINAPI *)(CONST TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetFileAttributesExA,
      
      2. Replace line# 125 -> NULL, by following line in ...\win\tclWin32Dll.cpp
          (BOOL (WINAPI *)(CONST TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetFileAttributesExW,
      
      3. Build TCL lib binaries.
      
      
      Test program begins here 
      --------------------------------------BEGIN----------------------------------
      // TclTest.cpp : Test program to demonstrate the Tcl_EvalFile() bug.
      //
      #include "stdafx.h"
      #include "direct.h"
      #include <tcl.h>
      #define SCTIPT_FILE"tclTest.tcl"
      #define SCTIPT_DIR"c:\\some\\dir"
      #define SCTIPT_FPATH"c:\\some\\dir\\tclTest.tcl"
      
      int main(int argc, char* argv[])
      {
      Tcl_Interp*interp = Tcl_CreateInterp();
      if (!interp) {
      fprintf(stderr, "Tcl_CreateInterp failed\n"); return 1;
      }
      if(chdir(SCTIPT_DIR)) {
      fprintf(stderr, "chdir failed\n"); return 2;
      }
      //////////////// Tcl_EvalFile() fails.......
      if (Tcl_EvalFile(interp, SCTIPT_FILE) != TCL_OK) {
      fprintf(stderr, "1: Tcl_EvalFile failed\n\tERROR: %s\n", interp->result);
      }
      //////////////// Tcl_EvalFile() fails.......here too!!!!!
      if (Tcl_EvalFile(interp, SCTIPT_FPATH) != TCL_OK) {
      fprintf(stderr, "2: Tcl_EvalFile failed\n\tERROR: %s\n", interp->result);
      }
      Tcl_DeleteInterp(interp);
      return 0;
      }
      --------------------------------------END----------------------------------
      
      Output of the test program :
      ----------------------------BEGIN OUTPUT---------------------------
      1: Tcl_EvalFile failed
              ERROR: couldn't read file "tclTest.tcl": no such file or directory
      2: Tcl_EvalFile failed
              ERROR: couldn't read file "c:\some\dir\tclTest.tcl": permission denied
      ----------------------------------END OUTPUT------------------------
      
      Step through the Tcl_EvalFile() call .......see following stack....
      
      TclpObjNormalizePath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x007d7198, int 0x00000000) line 1997
      TclNormalizeToUniquePath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x007d7198) line 1086 + 15 bytes
      FSNormalizeAbsolutePath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x007d7228) line 1008 + 13 bytes
      Tcl_FSGetCwd(Tcl_Interp * 0x00000000) line 2025 + 13 bytes
      Tcl_FSGetNormalizedPath(Tcl_Interp * 0x00000000, Tcl_Obj * 0x007d7270) line 4293 + 9 bytes
      Tcl_FSGetFileSystemForPath(Tcl_Obj * 0x007d7270) line 4846 + 11 bytes
      Tcl_FSStat(Tcl_Obj * 0x007d7270, _stati64 * 0x0012febc) line 1554 + 9 bytes
      Tcl_FSEvalFile(Tcl_Interp * 0x007e1100, Tcl_Obj * 0x007d7270) line 1334 + 13 bytes
      Tcl_EvalFile(Tcl_Interp * 0x007e1100, const char * 0x00420090 ??_C@_0M@OJLM@tclTest?4tcl?$AA@) line 234 
      + 13 bytes
      main(int 0x00000001, char * * 0x00900e90) line 26 + 17 bytes
      mainCRTStartup() line 206 + 25 bytes
      KERNEL32! GetProcessPriorityBoost + 279 bytes
      ----------------END STACK TRACE------------
      
      The TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) is entered with pathPtr= Tcl_Obj("c:/some/dir")
      and nextCheckpoint= 0.
      
      This function is broke.... it returns "<drive>:/" (eg."C:/") for whatever dir path is passed to it.
      
      Thanks for your support.
      
      -Prashant
      [email protected]
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  8. Ticket change [220817e059] (rid 130687) by vincentdarley on 2002-09-02 16:26:03:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      As per the documentation, you need to call 
      Tcl_FindExecutable first.  None of the things you point 
      out are bugs.  sorry!
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. resolution changed to: "Invalid"
    5. status changed to: "Closed"
    6. username: "vincentdarley"
  9. Ticket change [658e08aeb1] (rid 102569) by vincentdarley on 2002-09-02 16:26:04:

    1. closedate changed to: "2002-09-02T09:26:04"
    2. closer changed to: "vincentdarley"
  10. Ticket change [8bb3eb49cd] (rid 127614) by nobody on 2002-09-04 09:55:46:

    1. icomment:
      Logged In: NO 
      
      Please point me to the document which recommends user need to call Tcl_FindExecutable() before Tcl_EvalFile()
      
      I could not find it on Man pages for both of the library calls.
      
      Also Is there any special pre-requisit before loading DLL ?
      Example :
      
      if {$tcl_platform(os) == {Windows NT}} {
      load libNT.dll
      }
      
      thanks.
      
      -Prashant
      [email protected]
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  11. Ticket change [178737d2b4] (rid 122511) by vincentdarley on 2002-09-04 23:17:25:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2002-09-04T16:17:25"
    3. closer changed to: "vincentdarley"
    4. icomment:
      Logged In: YES 
      user_id=32170
      
      changed name of bug and assigned to dgp to decide 
      whether better documentation is needed to avoid this 
      overly frequent problem.
      
      
      
    5. login: "vincentdarley"
    6. mimetype: "text/plain"
    7. title changed to: "Tcl_FindExecutable documentation"
    8. username: "vincentdarley"