Artifacts Associated With Ticket 467505ffffffffff
Ticket change [881bc8af62] (rid 131813) by deech on 2001-10-03 14:40:37:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
A very simple test program has been attached that crashes on windows 2000, after being compiled with VC6 (sp5). This has been tested on two win 2000 machines with consistent behaviour. This code successfully Evals some commands, (i.e. "puts $auto_path") but crashes on many other commands. A couple of these other commands have been included with in the comments of the source code. This has also been tested on windows NT compiled under VC5 (sp3) and works fine (i.e. No Crash!).
- foundin initialized to: "obsolete: 8.3.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "deech"
- subsystem initialized to: "None"
- title initialized to: "embedded interp crashes on win 2000"
- type initialized to: "Bug"
Add attachment "TclEmbedEx.cpp" [f6c4c4b7c5] (rid 130356) by deech on 2001-10-03 21:40:38.
Ticket change [67a600f9cc] (rid 102921) by deech on 2001-10-03 21:40:39:
- icomment:
File Added - 11523: TclEmbedEx.cpp
- login: "deech"
- mimetype: "text/plain"
- username: "deech"
- icomment:
Ticket change [6d8e930f89] (rid 128724) by deech on 2001-10-03 23:23:07:
- icomment:
Logged In: YES user_id=339882 With further investigation, it seems this also happens with the latest version of tcl (8.4a3) on windows 2000. "Normal" tcl commands seems to function, (i.e. puts, for, if...) the 'info' command seems to consistently crash the interpreter, as well attempting to access functions in loaded packages also seems to crash the interpreter. Ex. package require simple //functions fine puts [simple::upper SoMeStRiNg] //unhandled exception - login: "deech"
- mimetype: "text/plain"
- username: "deech"
- icomment:
Ticket change [ce8291bf2b] (rid 96072) by dgp on 2001-10-04 04:28:16:
- assignee changed to: "dgp"
- subsystem changed to: "50. Embedding Support"
Ticket change [5ff27a085e] (rid 115909) by davygrvy on 2001-11-07 13:46:14:
- icomment:
Logged In: YES user_id=7549 The bug is in Win2K and Tcl. Tcl_MakeFileChannel() was repaired in 8.4 more than a year ago. The STARTUPINFO handed to the GUI application that embedds Tcl, has invalid data in the 3 standard handles: .hStdInput .hStdOutput .hStdError They were previously accepted without question and only tested if == NULL || == INVALID_HANDLE_VALUE. But Win2K is putting garbage there. See Tcl_MakeFileChannel() in tclWinChan.c (HEAD code in CVS) for the big effort I did with __try/__except. A possibly better check might be to use HasConsole() first, to see if the data in the STARTUPINFO should be worth checking. The belt and suspender exception handling in Tcl_MakeFileChannel() could be left in place, though. The error you should be getting is: can not find channel named "stdout" [puts ""] will never work in your case anyways, as there is no destination in a GUI application unless it calls AllocConsole() to create one. I'll have a look at your code...
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [4e0b848697] (rid 127160) by davygrvy on 2001-11-07 13:57:15:
- icomment:
Logged In: YES user_id=7549 Ok, you are using a console app. Sorry about my GUI comments. I don't think you should be mixing Tcl_WriteObj() [<- the deep end of puts] and cout. I have some stream code that'll set cout to use Tcl_WriteObj() instead, if you want it (?) They do eventually land in the same place, but take very different paths to get there. I've always been leary of mixing the two, but I can't say it is wrong, either.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [1d892cd2b4] (rid 90834) by davygrvy on 2001-11-07 14:00:50:
- icomment:
Logged In: YES user_id=7549 PS. where they both land together is here, BTW: WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msg, _tcslen(msg), &dwWritten, NULL); And GetStdHandle(STD_OUTPUT_HANDLE) returns garbage on Win2K within a GUI application.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [b2d2ad14e0] (rid 98409) by dgp on 2001-11-10 02:55:51:
- assignee changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=80530 Judging from davygrvy's comments, the trouble here is in Tcl's handling of std channels on Win2K. Assigning to that category.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "27. Channel Types"
- username: "dgp"
Ticket change [dc936d5b51] (rid 114506) by andreas_kupries on 2001-12-12 01:18:10:
- assignee changed to: "davygrvy"
- icomment:
Logged In: YES user_id=75003 David, I just compared the head of tcl (8.4.aXXX) against the head of core-8-3-1-branch (= head of 8.3.4+) and the only difference I saw in "tclWinChan.c" was an adaption of "TclpOpenFileChannel" to the new VFS code. "Tcl_MakeFileChannel" is the same in both files. And I am unable to see the big __try/__except sections you are refering too. Can you give me line numbers ? Is that the code for FILE_TYPE_UNKNOWN where you try to dup a handle to check its validity ? Assigned to you so that you see my question.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
Ticket change [f29f7df518] (rid 109584) by davygrvy on 2002-05-28 12:29:22:
- closedate changed to: "2002-05-28T05:29:22"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 Calls to Tcl_Eval() must use writable strings as per the docs. r = Tcl_Eval(g_interp, "puts [info patchlevel]"); that is guarenteed crash. Change it to this: char cmd[] = "puts [info patchlevel]"; r = Tcl_Eval(g_interp, cmd);
- login: "davygrvy"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "davygrvy"