Artifacts Associated With Ticket 599376ffffffffffffffffffffffffffffffffff
Ticket change [fc46775f58] (rid 108208) by nobody on 2002-08-23 19:08:47:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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] - foundin initialized to: "obsolete: 8.4b2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "37. File System"
- title initialized to: "Tcl_EvalFile dosn't look in current dir"
- type initialized to: "Bug"
Ticket change [0c347f0cf9] (rid 114137) by nobody on 2002-08-27 17:43:24:
- 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.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [69e0a28353] (rid 128053) by vincentdarley on 2002-08-28 19:46:18:
- closedate changed to: "2002-08-28T12:46:18"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Can't reproduce this without further information.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- status changed to: "Pending"
- username: "vincentdarley"
Ticket change [7eefe74f29] (rid 97490) by nobody on 2002-08-31 02:07:49:
- 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 - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [175399c11e] (rid 122471) by andreas_kupries on 2002-08-31 02:16:01:
- 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 ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "andreas_kupries"
- icomment:
Ticket change [bea4b72ec4] (rid 102109) by nobody on 2002-08-31 02:23:55:
- 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
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [bd5e1fa57b] (rid 101893) by nobody on 2002-08-31 07:12:59:
- 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] - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [220817e059] (rid 130687) by vincentdarley on 2002-09-02 16:26:03:
- 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!
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "vincentdarley"
- icomment:
Ticket change [658e08aeb1] (rid 102569) by vincentdarley on 2002-09-02 16:26:04:
- closedate changed to: "2002-09-02T09:26:04"
- closer changed to: "vincentdarley"
Ticket change [8bb3eb49cd] (rid 127614) by nobody on 2002-09-04 09:55:46:
- 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] - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [178737d2b4] (rid 122511) by vincentdarley on 2002-09-04 23:17:25:
- assignee changed to: "dgp"
- closedate changed to: "2002-09-04T16:17:25"
- closer changed to: "vincentdarley"
- 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.
- login: "vincentdarley"
- mimetype: "text/plain"
- title changed to: "Tcl_FindExecutable documentation"
- username: "vincentdarley"