Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python crash using Tkinter #68712

Closed
tomnor mannequin opened this issue Jun 28, 2015 · 6 comments
Closed

python crash using Tkinter #68712

tomnor mannequin opened this issue Jun 28, 2015 · 6 comments
Labels
topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@tomnor
Copy link
Mannequin

tomnor mannequin commented Jun 28, 2015

BPO 24524
Nosy @terryjreedy, @serhiy-storchaka
Superseder
  • bpo-22810: tkinter: "alloc: invalid block:" after askopenfilename
  • 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 2015-07-03.17:56:56.891>
    created_at = <Date 2015-06-28.22:01:27.900>
    labels = ['expert-tkinter', 'type-crash']
    title = 'python crash using Tkinter'
    updated_at = <Date 2015-07-05.21:20:08.521>
    user = 'https://bugs.python.org/tomnor'

    bugs.python.org fields:

    activity = <Date 2015-07-05.21:20:08.521>
    actor = 'tomnor'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-07-03.17:56:56.891>
    closer = 'terry.reedy'
    components = ['Tkinter']
    creation = <Date 2015-06-28.22:01:27.900>
    creator = 'tomnor'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 24524
    keywords = []
    message_count = 6.0
    messages = ['245917', '246200', '246202', '246203', '246311', '246340']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'serhiy.storchaka', 'tomnor']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '22810'
    type = 'crash'
    url = 'https://bugs.python.org/issue24524'
    versions = ['Python 2.7']

    @tomnor
    Copy link
    Mannequin Author

    tomnor mannequin commented Jun 28, 2015

    $ python
    Python 2.7.9 (default, Mar  1 2015, 18:22:53) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    The readline tab completion thing should be loaded. (pythonstartup.py @home)
    >>> import Tkinter as tk
    >>> import tkFileDialog as tfd
    >>> tk.Tk()
    <Tkinter.Tk instance at 0xb72206ec>
    >>> tk.Tk()
    <Tkinter.Tk instance at 0xb7117a8c>
    >>> tfd.askopenfilename()
    u'/home/tomas/.emacs'
    >>> # closing the root window
    ... 
    >>> alloc: invalid block: 0x99ddcd8: 88 9
    Aborted
    $
    $ uname -a
    Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u1 i686 GNU/Linux

    See also bpo-22810

    @tomnor tomnor mannequin added topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump labels Jun 28, 2015
    @terryjreedy
    Copy link
    Member

    This should be closed as duplicate of bpo-22810. Tracker malfunctioning right now.

    @terryjreedy
    Copy link
    Member

    Will not accept superseder

    @terryjreedy
    Copy link
    Member

    On Windows 7, no problem on either 2.7.10 or 3.5.0b2 (running from Command Prompt so would see message is there were one).

    @serhiy-storchaka
    Copy link
    Member

    Unfortunately can't reproduce the issue in 2.7.6, 2.7.10+, 3.4.0, 3.4.3+, 3.5.0b2+, 3.6.0a0 with Tcl/Tk 8.6.1.

    The only output is:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python2.7/lib-tk/tkFileDialog.py", line 125, in askopenfilename
        return Open(**options).show()
      File "/usr/lib/python2.7/lib-tk/tkCommonDialog.py", line 48, in show
        s = w.tk.call(self.command, *w._options(self.options))
    _tkinter.TclError: can't invoke "grab" command: application has been destroyed

    @tomnor
    Copy link
    Mannequin Author

    tomnor mannequin commented Jul 5, 2015

    I have not experienced this problem on windoze. The problem seem to have appeared when upgrading my operating system from Debian wheezy to jessie, I think with python going from 2.7.3 to 2.7.9. And I have a stomach feeling it is related to the environment. I have filed a bug report at debian too, or I am working on it.

    With the initial description I have been wanting to say that just opening the root window and closing it does not crash python. But open it, use askopenfilename and then close the root window lead to a crash.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-tkinter type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants