Skip to content

Tkinter File Dialog crashes on Win7 when saving to Documents Library #57197

Closed

Description

@BrianGernhardt
BPO 12988
Nosy @terryjreedy, @amauryfa, @serwy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-03-08.20:47:55.657>
created_at = <Date 2011-09-15.21:45:05.434>
labels = ['expert-tkinter', 'OS-windows', 'type-crash']
title = 'Tkinter File Dialog crashes on Win7 when saving to Documents Library'
updated_at = <Date 2013-03-08.20:47:55.656>
user = 'https://bugs.python.org/BrianGernhardt'

bugs.python.org fields:

activity = <Date 2013-03-08.20:47:55.656>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2013-03-08.20:47:55.657>
closer = 'terry.reedy'
components = ['Tkinter', 'Windows']
creation = <Date 2011-09-15.21:45:05.434>
creator = 'Brian.Gernhardt'
dependencies = []
files = []
hgrepos = []
issue_num = 12988
keywords = []
message_count = 11.0
messages = ['144106', '144157', '144160', '147452', '161168', '161170', '162448', '162449', '162450', '165048', '183765']
nosy_count = 7.0
nosy_names = ['terry.reedy', 'amaury.forgeotdarc', 'gpolo', 'roger.serwy', 'Brian.Gernhardt', 'Cody.C', 'alirahmjoo']
pr_nums = []
priority = 'high'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue12988'
versions = ['Python 3.2']

Activity

  1. BrianGernhardt commented on Sep 15, 2011

    BrianGernhardtmannequin
    MannequinAuthor

    Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit (AMD64)] on win32

    Steps:

    1. Start IDLE
    2. Open Save dialog (File > Save or Ctrl-S)
    3. Select Libraries from the buttons on the left or the dropdown on top.
    4. Double-click on Documents
    5. Enter any file name (test.txt)
    6. Hit enter or click save
    7. See "pythonw.exe has stopped working dialog"

    I tried running it from the command line (via c:\python32\python -m idlelib.idle) and it produced no useful error messages.

  2. terryjreedy commented on Sep 16, 2011

    @terryjreedy
    Member

    I got same with 3.2.2. I did it first from editor window and it only crashed that window, leaving the shell window ok until I tried it there also.

  3. terryjreedy commented on Sep 16, 2011

    @terryjreedy
    Member

    The view of MyDocuments in the save dialog is different from that of Windows Explorer. In particular, it shows a directory twice, the current version and an older version. Double clicking the current version, to see the contents, also crashed IDLE without saving. Win Explorer moves into that directory just fine.

    Tried it again, and double click into dirs now works. Saving still crashes. But I still see two versions of the directory when accessing from IDLE (until I redeleted the older one). Saving still crashes.

  4. added
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Nov 11, 2011
  5. CodyC commented on Nov 11, 2011

    CodyCmannequin
    Mannequin

    Still an issue as of 11/11/11.

  6. serwy commented on May 19, 2012

    serwymannequin
    Mannequin

    On Win7, I can replicate the problem with 64-bit Python 3.2.3. However, it does not occur for 32-bit Python 3.2.2.

    This problem is not due to IDLE. There is a problem with the 64-bit version of tkinter's file dialog. From a 64-bit python environment, bring up the dialog with:

        import tkinter.filedialog
        tkinter.filedialog.asksaveasfile()

    and repeat the steps 3-6 from msg144106. It crashes. Repeating this with a 32-bit python environment does not have a problem.

  7. changed the title [-]IDLE on Win7 crashes when saving to Documents Library[/-] [+]Tkinter File Dialog crashes on Win7 when saving to Documents Library[/+] on May 19, 2012
  8. terryjreedy commented on May 19, 2012

    @terryjreedy
    Member

    I re-verified this on win7-64 with 3.3.0a3
    From Idle, Idle remains after clicking away the error box.
    From Command Prompt, CP disappears after clicking away box.

    Problem is not specific to Donwloads. Other Libraries fail also.
    Desktop and other normal places succeed.

    I cannot but wonder if this is a tk bug.

  9. terryjreedy commented on Jun 7, 2012

    @terryjreedy
    Member

    I closed bpo-14996 as a duplicate of this. The OP there claimed that behavior changed between 3.2.1 and 3.2.3 and that she had same problem with 32 bit installation. It is hard to know the exact circumstances of the problem until we find its cause.

    Looking further, I am sure this is a tk and/or Win7 problem.
    tkinter.filedialog.asksaveasfile() calls SaveAs(**options).show()
    SaveAs sets command = "tk_getSaveFile" and inherits _Dialog which inherits commondialog.Dialog. The show method of that calls
    tk.call(self.command, *w._options(self.options)). Since the test call has no options, self.options is an empty dict and I presume the serialized form w._options() is also. So the call amounts to
    tk.call("tk_getSaveFile"), which suspends python until the dialog returns.

    That said, 3.3.0a4 was released a week ago with tcl/tk upgraded, in the Windows installer, from 8.5.9 to 8.5.11. So I retried the previous test and the problem is gone. Can someone else verify? If so, we can close this as fixed. (I believe that the same upgrade will appear in future 3.2 and 2.7 releases, but I am not sure.)

  10. serwy commented on Jun 7, 2012

    serwymannequin
    Mannequin

    I installed 3.3.0a4 (64-bit) on Win 7 and the issue did not occur when using asksaveasfile. I repeated with 32-bit 3.3.0a4 without any problems.

    How can we confirm that 3.2 will receive the Tcl/Tk upgrade? (64-bit 2.7.3 does not have this bug.)

  11. serwy commented on Jun 7, 2012

    serwymannequin
    Mannequin

    Re-opened.

  12. reopened this on Jun 7, 2012
  13. alirahmjoo commented on Jul 8, 2012

    alirahmjoomannequin
    Mannequin

    I have exactly the same problem mentioned by Brian Gernhardt for 32-bit Python 3.2.3 on Win7.

  14. terryjreedy commented on Mar 8, 2013

    @terryjreedy
    Member

    As near as I can tell, the tcl/tk distributed with Windows is not upgraded in bugfix releases. I presume it is a matter of testing and stability and not introducing any new features in the new tcl/tk. In any case, on Windows, this is fixed in 3.3 (and hopefully in 3.4) but will apparently not be fixed in earlier microreleases. That sometimes happens.

  15. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions