Tcl Source Code

View Ticket
Login
Ticket UUID: 219245
Title: "Application Error" when closing tclsh83.exe (tcl8.3.1 with
Type: Bug Created on: 2000-10-26 05:04:06
Submitter: nobody Assigned to: nobody
Subsystem: 49. Threading Severity:
Priority: 5 Medium Last modified: 2001-04-26 07:40:37
Status: Closed Closed by: davygrvy
Resolution: Duplicate Closed on: 2001-04-26 00:40:37
Version: obsolete: 8.3
Description:
OriginalBugID: 5312 Bug
Version: 8.3
SubmitDate: '2000-05-02'
LastModified: '2000-05-17'
Severity: MED
Status: Assigned
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 5524 5829 5804
OS: Windows NT
OSVersion: Windows NT 4.0 Workstation
Machine: Dell Latitude Notebook
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Michael Kraus

ReproducibleScript:
- Downloaded Source Distribution of Tcl 8.3.1 from dev.scriptics.com.
- Compiled on NT4.0 with MS Visual Studio 6.0 (no changes made to makefile.vc except paths to VS 6.0). Thread support TURNED ON! No warnings were issued.
- Then installed using the "install" target of makefile.vc
- Tclsh83.exe runs fine but throws an Application Error ("The instruction at 0x77f6cadf referenced memory at 0x00000010...") when closed by means of the window menu ("Close" entry)
- Note: When closed with the "exit" command, no error occurs. When compiled WITHOUT thread support, "Close" from the menu works.

ObservedBehavior:
Tclsh83.exe throws an "Application Error" when terminated with "Close" from the window's menu. It does that ONLY with activated thread support.

DesiredBehavior:
Tclsh83.exe should terminate gracefully with and without thread support, when activating the "Close" entry of the menu.



Newsgroup response:
[email protected] wrote:

>Tclsh83.exe runs fine but throws an Application Error ("The instruction at 0x77f6cadf referenced memory at 0x00000010...")
> when closed by means of the window menu ("Close" entry)

Confirmed!

It throws the exception on line 151 of tclWinNotify.c in
Tcl_FinalizeNotifier().  It looks like the notifier data coming in to the
function is invalid.

The debugger also says:
The thread 0x6B0 has exited with code -1073741510 (0xC000013A).
The thread 0x4B4 has exited with code -1073741510 (0xC000013A).
The thread 0x660 has exited with code -1073741510 (0xC000013A).
First-chance exception in tclsh83d.exe (NTDLL.DLL): 0xC0000005: Access
Violation.

So it looks like the OS might be terminating running threads for us in reverse
order.  This needs a more thorough investigation.  I'll assume right now that
tclAppInit.c (the app, not the dll) might need a control-c handler provided by
Win32's SetConsoleCtrlHandler() for a controlled shut-down.

Just guessing :)
--
* David Gravereaux * 
-- 05/03/2000 hobbs
User Comments:
davygrvy added on 2001-04-26 07:40:37:
Logged In: YES 
user_id=7549

See https://sourceforge.net/tracker/index.php?
func=detail&aid=219355&group_id=10894&atid=110894