Subject: always get illegal operation when exiting tcl application
From: [email-masked] (Andrew Pavlomanolakos)

21 Nov 1997 08:54:14 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

Hello,

I am having problems with a Tcl/Tk application that I have ported
from UNIX to Windows 95. The application operates correctly but always
generates the following error message when the user exits the application.

ZZZ caused an invalid page fault in
module CW3215.DLL at 0137:004b3f66.
Registers:
EAX=0264fffc CS=0137 EIP=004b3f66 EFLGS=00010203
EBX=0487fc08 SS=013f ESP=0487fbfc EBP=0487fc28
ECX=00000001 DS=013f ESI=00000000 FS=23e7
EDX=00000020 ES=013f EDI=004d002c GS=0000
Bytes at CS:EIP:
8b 00 89 43 1c 64 67 a1 00 00 89 03 64 67 89 1e 
Stack dump:
02660ba0 004cbccc 004d2e58 004d2f71 004b32df 004d39c0 0487fc04 00000000
00000000 004d2f71 0487fc3c 0487fc3c 004b2547 02660ba0 00000003 004c6b8c

I have found that the following trivial Tcl only program exhibits exactly
the same fault:

#include <tcl.h>

int
Tcl_AppInit(Tcl_Interp *interp)
{
        if (Tcl_Init(interp) == TCL_ERROR)
                return TCL_ERROR;
        return TCL_OK;
}

int
main(int argc, char **argv)
{
        Tcl_Main(argc, argv, Tcl_AppInit);
        return 0;
}

I created a tcl76.lib as follows:

dlltool --dllname tcl76.dll --def tcl76.def --output-lib tcl76.lib -k

The tcl76.def was obtained from the cdk-src.tgz archive, tcl76.dll was
taken from cdk.exe.

To compile I used:

gcc -c -I/gnuwin32/b18/include main.c
gcc  -o zzz.exe main.o  tcl76.lib

Environment is Windows 95, beta-18 cdk.exe with the following in
autoexec.bat:

set GCC_EXEC_PREFIX=c:\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\
set PATH=%PATH%;c:\gnuwin32\b18\H-i386-cygwin32\bin;c:\gnuwin32\b18\tcl\bin
set TCL_LIBRARY=c:/gnuwin32/b18/tcl/lib/tcl7.6
set GDBTK_LIBRARY=c:/gnuwin32/b18/share/gdbtcl

Any help would be greatly appreciated.

Regards, Andrew

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".