|
2026-10-08
| ||
| 15:39 | • Ticket [fb13231f] Messagebox can crash app on mac status still Open with 3 other changes artifact: f04fe5ab user: chrstphrchvz | |
| 13:02 | • Ticket [c03b8eb7] Document the requirement not to call tk_messageBox from idle events under aqua status still Open with 3 other changes artifact: bd31609b user: serhiy.storchaka | |
|
2022-05-01
| ||
| 11:54 | • Ticket [c03b8eb7]: 3 changes artifact: 61fc8eb4 user: chrstphrchvz | |
|
2021-03-23
| ||
| 19:31 | • Ticket [815f779d] macOS crashes status still Open with 3 other changes artifact: efd5b536 user: chrstphrchvz | |
|
2020-09-03
| ||
| 13:47 | • New ticket [c03b8eb7] Document the requirement not to call tk_messageBox from idle events under aqua. artifact: 856a3a68 user: anonymous | |
| Ticket UUID: | c03b8eb71f2fa05c73eb9a92625e353a084895a6 | |||
| Title: | Document the requirement not to call tk_messageBox from idle events under aqua | |||
| Type: | Patch | Version: | 8.6.10 | |
| Submitter: | anonymous | Created on: | 2020-09-03 13:47:59 | |
| Subsystem: | 99. Other | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2026-10-08 13:02:41 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
I've been puzzling for some time over an application that crashes under some circumstances when macOS starts it when the user double-clicks on a file associated with it; the problem turned out to be that the file had a formatting error, causing a tk_messageBox call (from, ultimately, a callee of ::tk::mac::OpenDocument) to notify the user that the file's corrupt. According to ticket 1b286c99aef5183365641ba2de55446e57deac94 this is because it's not correct to call tk_messageBox from within an idle callback, and I can see after some source-diving that the ::tk::mac::* AppleEvent handler procs are called from idle callbacks. I can't find either of these facts documented in the manual pages; short of fixing the surprising behavior somehow, I suggest a diff vaguely like the following:
| |||
| User Comments: |
serhiy.storchaka added on 2026-10-08 13:02:41:
The handlers for Apple events are no longer run as idle callbacks (they are called directly or from a timer), and since [33b3af1cea] menu actions are run as idle tasks, so the proposed note would now be misleading. The actual problem was a modal dialog opened while AppKit is drawing: in 8.6 idle tasks run inside drawRect:, and in 9.0 they can still run inside updateLayer when a view is first shown or during a live resize. Marc, can a dialog opened in those cases still crash? If so, it is probably better to defer it in Tk than to document it. chrstphrchvz added on 2022-05-01 11:54:08: Subscribing myself in case of updates. | |||
