Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-12-01
04:04 • Closed ticket [642280ffff]: Crash on Win2000 with 'source' command p... artifact: be957567ff user: hobbs
2002-11-23
01:31 • Ticket [642280ffff]: 6 changes artifact: f1a840fc1d user: vincentdarley
2002-11-22
21:50 • Ticket [642280ffff]: 4 changes artifact: 82ed20e469 user: dkf
13:40 • New ticket [642280ffff]. artifact: fdc5aa5bc1 user: nobody

Crash on Win2000 with 'source' command

Closed / Invalid642280ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-11-22 13:40:27
In some ( rare, but it's repeatable ) case 'source' 
command crashes system with message 'Can't execute 
address 0'. I have TCL 8.4.1 built by myself, Win2000 
Professional OS. This error didn't occur in TCL 8.3.4. 
TCL is used as embedded interpreter in multithreaded 
application ( compiled with thread protect ). 


I tracked this bug a bit and found out that this happens 
in file tclWinFile.c, line 2095 ( or about that ):
if ((*tclWinProcs->getFileAttributesExProc)(nativePath,
    GetFileExInfoStandard, &data) != TRUE) {
    /* File doesn't exist */
    Tcl_DStringFree(&ds);
    break;
}

This field ( getFileAttributesExProc ) is NULL, so calling 
to it crashes system. Placing protection if( ... != NULL ) 
helps to avoid crash but results in 'source' command fail.
dkfplain2002-11-22 21:50:16
Logged In: YES 
user_id=79902

This sort of problem usually seems to occur when some
software tries to use the Tcl library without calling
Tcl_FindExecutable() somwhere (or Tcl_Main(), which in turn
calls T_FE)  Could that be happening here?
vincentdarleyplain2002-11-23 01:31:27
Logged In: YES 
user_id=32170

If this is a bug, it is a bug in Tcl's init code that you
are now required to call Tcl_FindExecutable.

NB - effectively this same invalid "bug" has been reported
several times.
hobbsplain2002-12-01 04:04:41
Logged In: YES 
user_id=72656

The error is in initialization somewhere on the user's part.  
Tcl_FindExecutable or Tcl_Init are not being called early 
enough for these procs to be initialized.
Log in (anonymous is fine) to add a comment.