Menu

#3025 Cocoa Tk 8.5: Python IDLE crashes opening Preferences

obsolete: 8.5.12
closed-works-for-me
9
2012-11-05
2012-10-09
Anonymous
No

With a current Tcl/Tk built from the tk-cocoa-8-5-backport branch on OS and a Python that dynamically links with it, attempting to open Python IDLE's Preferences menu causes Tk to crash. By bisecting changes, it appear that this critical regression was introduced by fossil checkin 5393f608dd on 2012-08-06 ("Fixes for menu and wm fullscreen bugs"). http://core.tcl.tk/tk/info/5393f608dd

This problem was first noticed with the release of ActiveTcl 8.5.12.1, the current OS X ActiveTcl version; previous versions 8.5.12.0 and 8.5.11.1 do not exhibit this problem with IDLE.

To reproduce, install either the current OS X ActivePython 2.7.2 (http://www.activestate.com/activepython/downloads) or an OS X 64-bit/32-bit python.org python (http://www.python.org/download/), install Tcl and Cocoa Tk 8.5 in /Library/Frameworks, launch IDLE (for example, type /usr/local/bin/idle2.7 in a shell), then either select Python -> Preferences from the menu bar or press command-, (comma), the keyboard accelerator for the Preferences menu item.
Using a debug build of Cocoa Tk at current tip (77b3f433c7), the crash occurs at tkMacOSXMenu.c:681. See the attached crash dump.

http://bugs.python.org/issue15853

Discussion

  • Kevin Walzer

    Kevin Walzer - 2012-10-09

    Crash is visible in Python/Tkinter (IDLE) but not in Wish itself. It is not clear why this is the case.

    The OP's build of Tk appears to be against the Tk-Cocoa backport branch; Tk-Cocoa has just been merged into core-8-5-branch, which is what I tested. As noted, crash is not visible in Wish/Tk directly but is present in IDLE/Python.

     
  • Kevin Walzer

    Kevin Walzer - 2012-10-09
    • assigned_to: das --> wordtech
     
  • Don Porter

    Don Porter - 2012-11-05

    status of core-8-5-branch on this? Any more
    to do before 8.5.13?

     
  • Don Porter

    Don Porter - 2012-11-05
    • priority: 5 --> 9
     
  • Kevin Walzer

    Kevin Walzer - 2012-11-05
    • status: open --> closed-works-for-me
     
  • Kevin Walzer

    Kevin Walzer - 2012-11-05

    I've submitted a patch to the Python developers that works around the crash, which can't be reproduced in Tk itself. Closing as resolved.