Tk Source Code

View Ticket
Login
2024-07-27
02:55 Closed ticket [d233f01e]: Unhandled exception crash on exit plus 6 other changes artifact: dec5a5fd user: apnadkarni
02:54
Fix [d233f01e2a] - crash cleaning up clipboard on exit check-in: a00b36ff user: apnadkarni tags: trunk, main
2024-07-26
17:22 Ticket [d233f01e] Unhandled exception crash on exit status still Open with 3 other changes artifact: 6a9f1c1d user: fvogel
16:51 Ticket [d233f01e]: 4 changes artifact: e02fd1b5 user: oehhar
15:23 Ticket [d233f01e]: 4 changes artifact: 1d9eb0ff user: oehhar
14:56 Ticket [d233f01e]: 3 changes artifact: 7ec06a8a user: apnadkarni
13:58 Ticket [d233f01e]: 3 changes artifact: a1100874 user: apnadkarni
13:57 New ticket [d233f01e]. artifact: 819d2f2c user: apnadkarni

Ticket UUID: d233f01e2a8b3b68ff46e60ab215878284cb1c83
Title: Unhandled exception crash on exit
Type: Bug Version: 9.0b3rc0
Submitter: apnadkarni Created on: 2024-07-26 13:57:53
Subsystem: (unused) Assigned To: nobody
Priority: 5 Medium Severity: Severe
Status: Closed Last Modified: 2024-07-27 02:55:22
Resolution: Fixed Closed By: apnadkarni
    Closed on: 2024-07-27 02:55:22
Description:

tktest90 crashes on exit (I think). Narrowed it down to winClipboard.test (or at least this file by itself triggers the crash unlike other test files). Anyone testing will likely need to enable the JIT debugger on Windows else you will not notice the crash. Alternatively, check the Windows Application log where the crash is reported. My VS Studio debugger reports it cannot determine crash location because the unhandled exception is .NET 4.0 and the debugger only supports 2.0. I don't even know where .NET enters the picture (does Tk use any UI features from .NET) ?

Also happens with wish90.

User Comments: apnadkarni added on 2024-07-27 02:55:22:
Fixed in [a00b36ffb5].

fvogel added on 2024-07-26 17:22:41:
+1. Thanks!

oehhar added on 2024-07-26 16:51:31:

The error code "5" is an invalid memory access.

This may be caused by the code line:

winPtr->mainPtr->winPtr
with winPtr beeing a NULL pointer.

So, this also indicates, that the fix is effective.

I would just merge this, it is great !

Harald


oehhar added on 2024-07-26 15:23:25:

Hi Ashok ! Great work !

My recipe to reproduce:

  • start MS-VS 2015 x86 prompt
  • compile TCL 9.0b3rc0 and Tk9.0b3rc0 by "cd win; nmake -f Makefile.vc release"
  • start test in tk win folder by: "nmake -f makefile.vc test TCLDIR=c:\test\tcl9.0b3\tcl9.0b3 TESTFLAGS="-file winClipboard.test". For me, there are 8 passed tests and no failures.
  • Go to Windows Start button. Search "Event Viewer" -> German Windows finds "Ereignisanzeige" -> start it
  • Go to "Windows protocols -> Application" A crash is shown with the following text:
Name der fehlerhaften Anwendung: tktest90.exe, Version: 9.0.1.3, Zeitstempel: 0x66a35c1a
Name des fehlerhaften Moduls: tcl9tk90.dll, Version: 9.0.1.3, Zeitstempel: 0x66a35b24
Ausnahmecode: 0xc0000005
Fehleroffset: 0x00024879
ID des fehlerhaften Prozesses: 0x630
Startzeit der fehlerhaften Anwendung: 0x01dadf6df9204d0a
Pfad der fehlerhaften Anwendung: C:\test\tcl9.0b3\tk9.0b3\win\Release_VC1900\tktest90.exe
Pfad des fehlerhaften Moduls: C:\test\tcl9.0b3\tk9.0b3\win\Release_VC1900\tcl9tk90.dll
Berichtskennung: cf9f380c-c6e3-4993-b679-f4c66e948f94
Vollständiger Name des fehlerhaften Pakets: 
Anwendungs-ID, die relativ zum fehlerhaften Paket ist: 

Whenn adding the fix to tk, the error log entry is gone.

Great work !

Harald


apnadkarni added on 2024-07-26 14:56:26:
Proposed fix in [cc07c7a2]. Needs review.