Tk Source Code

View Ticket
Login
2026-03-27
14:49 • Closed ticket [8c362075]: "wm forget ." segfaults plus 6 other changes artifact: 87b239ca user: jan.nijtmans
14:45
Fix [8c3620752c]: "wm forget ." segfaults check-in: a9aa5d65 user: jan.nijtmans tags: trunk, main
14:43
Fix [8c3620752c]: "wm forget ." segfaults check-in: 74183ad4 user: jan.nijtmans tags: core-9-0-branch
14:39
Fix [8c3620752c]: crash on wm forget, windows part. closed check-in: 6ef8619d user: jan.nijtmans tags: bug-8c3620752c
2026-03-26
08:04 • Ticket [8c362075] "wm forget ." segfaults status still Open with 3 other changes artifact: 36467d97 user: erikleunissen
2026-03-25
21:44 • Ticket [8c362075]: 4 changes artifact: 09fb68cd user: marc_culler
21:40
Fix aqua case of [8c3620752c]: aqua and win crash on wm forget . check-in: 4f77fbca user: culler tags: bug-8c3620752c
19:57 • Ticket [8c362075] "wm forget ." segfaults status still Open with 4 other changes artifact: 27d67641 user: marc_culler
10:45 • Ticket [8c362075]: 4 changes artifact: a4592033 user: oehhar
08:31 • Ticket [8c362075]: 3 changes artifact: 8af08436 user: erikleunissen
08:29 • Add attachment crash_report-aqua.txt to ticket [8c362075] artifact: d24335e6 user: erikleunissen
08:29 • Add attachment crash_report-win32.txt to ticket [8c362075] artifact: 8bc48418 user: erikleunissen
08:28 • New ticket [8c362075] "wm forget ." segfaults. artifact: b221aded user: erikleunissen

Ticket UUID: 8c3620752cd048b5c57aea84c8e15fa855b72d78
Title: "wm forget ." segfaults
Type: Bug Version: 9.0.3
Submitter: erikleunissen Created on: 2026-03-25 08:28:56
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Severe
Status: Closed Last Modified: 2026-03-27 14:49:16
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2026-03-27 14:49:16
Description:
Observed with Tk9.0.3 on MS Windows and macOS/aqua.
To be reproduced by invoking:

> wish
% wm forget .

For each windowing system, the ensuing crash report, containing a stack trace,
is attached.
User Comments: jan.nijtmans added on 2026-03-27 14:49:16:

So, I did the windows part too (and make sure it really fixes the crash!)

Done [74183ad460eb6ef6|here]


erikleunissen added on 2026-03-26 08:04:31:
I confirm that the crash doesn't occur anymore with branch bug-8c3620752c at
commit [4f77fbcac5].

marc_culler (claiming to be Marc Culler) added on 2026-03-25 21:44:07:
I pushed a fix for aqua as branch bug-8c3620752c.

The fix just avoids using winPtr->parentPtr when it is a NULL pointer.

I will leave the Windows case for someone who knows their way around the
Windows code.

marc_culler (claiming to be Marc Culler) added on 2026-03-25 19:57:31:
That command is something which I had not heard about before.  So I
looked at the manual.

The manual entry for wm forget says:

"wm forget window
    The window will be unmapped from the screen and will no longer be managed
    by wm."

The manual entry for wm withdraw says:

"wm withdraw window
    Arranges for window to be withdrawn from the screen. This causes the
    window to be unmapped and forgotten about by the window manager."

What is supposed to be the difference between those two things?

oehhar added on 2026-03-25 10:45:20:

I remember that we had a patch to trap this, origin from Androwish. I may be wrong... Will look later, Harald


Attachments: