Tk Source Code

View Ticket
Login
Ticket UUID: d39d1f8678a8591b9aa4825171919b70eccefc65
Title: Tcl panic on macOS after <tell application "Wish" to open>
Type: Bug Version: 8.6.10
Submitter: marc_culler Created on: 2020-10-20 22:34:21
Subsystem: 66. Aqua Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-22 17:22:38
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-10-04 11:11:45
Description:
Running the script

  tell application "Wish" to open

produces a crash, with a Tcl_Panic abort.  The crash occurs in
TimerHandlerEventProc when it calls ckfree.  You see the console window
briefly before the crash.  I tried commenting out all calls to
Tcl_CreateTimerHandler in the macosx directory and that had no effect.

I am pretty sure that the evil TimerHandler causing the crash is the one
which blinks the cursor for the text widget in the console window.
Maybe the TimerHandler is being created before Tcl is ready to start
processing timer events.

There is no point in posting the crash report since you can easily generate
your own by opening the Script Editor app and running that script.
User Comments: serhiy.storchaka added on 2026-10-04 11:11:45:

This was the double processing of Apple Events on the 8.7 line after [c7a9e22a1c] (an idle callback and a timer, each freeing the event data), which is why it disappeared with 8.6. Fixed by [be960311b8] for [794100ec81].


marc_culler (claiming to be Marc Culler) added on 2020-10-21 01:03:33:
This is probably not a real issue, so I will mark the bug as pending.

I was working on Tk 8.6.  I deleted Tk 8.7.  Then Script Editor gave
an error "The file Wish was not found."  I closed Script Editor, opened
Wish, opened Script Editor and ran "tell application Wish to quit".
That worked.  Then I tried "tell application Wish to open.  It worked
too.  Just more Apple indeterminacy, I guess.