Tk Source Code

View Ticket
Login
2005-01-09
14:09 Closed ticket [637653ffff]: Deleting a popup menu crashes wish plus 6 other changes artifact: 4f908e8103 user: chengyemao
06:59
bug fix [637653] check-in: 30b3719bac user: chengyemao tags: trunk
2003-03-04
02:31 Ticket [637653ffff] Deleting a popup menu crashes wish status still Open with 5 other changes artifact: 5c24ebcdcf user: tmh
2002-11-13
09:17 New ticket [637653ffff]. artifact: a33b124467 user: dkf

Ticket UUID: 637653
Title: Deleting a popup menu crashes wish
Type: Bug Version: obsolete: 8.4b1
Submitter: dkf Created on: 2002-11-13 09:17:40
Subsystem: 13. Win Menus Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2005-01-09 14:09:23
Resolution: None Closed By: chengyemao
    Closed on: 2005-01-09 07:09:23
Description:
Transferred from
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=637648&group_id=10894
-------------------------------------
The following code causes a serious crash of 
wish84.exe on Windows XP,  if you click the right 
mouse button on the canvas.
-------------------------------------
pack [canvas .c]
bind .c <ButtonPress-3> {
    set w .popupmenu
    catch {destroy $w}
    menu $w -tearoff 0
    $w add command -label TEST
    $w post %X %Y
}
bind .c <ButtonRelease-3> {
    catch {destroy .popupmenu}
}
------------------------------------
This script is okay on Unix.
User Comments: chengyemao added on 2005-01-09 14:09:23:
Logged In: YES 
user_id=191079

Need to check if the menu was deleted during item draw and 
measurement.  Bug has been fixed in Tk 8.5a2.

Chengye

tmh added on 2003-03-04 02:31:13:
Logged In: YES 
user_id=92123

I confirm that this causes a crash.  An attemp to access
memory that is no longer valid.