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

IDLE accepts, then crashes, on invalid key bindings. #57280

Closed
jfalskfjdslakfdjsallaksfjaslkfdjsal mannequin opened this issue Sep 30, 2011 · 11 comments
Closed

IDLE accepts, then crashes, on invalid key bindings. #57280

jfalskfjdslakfdjsallaksfjaslkfdjsal mannequin opened this issue Sep 30, 2011 · 11 comments
Labels
topic-IDLE type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@jfalskfjdslakfdjsallaksfjaslkfdjsal
Copy link
Mannequin

BPO 13071
Nosy @terryjreedy, @amauryfa, @ezio-melotti, @serwy
Superseder
  • bpo-11437: IDLE crash on startup with typo in config-keys.cfg
  • 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 2012-01-26.04:35:35.342>
    created_at = <Date 2011-09-30.00:05:21.782>
    labels = ['expert-IDLE', 'type-crash']
    title = 'IDLE accepts, then crashes, on invalid key bindings.'
    updated_at = <Date 2012-01-26.04:35:35.341>
    user = 'https://bugs.python.org/jfalskfjdslakfdjsallaksfjaslkfdjsal'

    bugs.python.org fields:

    activity = <Date 2012-01-26.04:35:35.341>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-01-26.04:35:35.342>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2011-09-30.00:05:21.782>
    creator = 'jfalskfjdsl;akfdjsa;l.laksfj;aslkfdj;sal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 13071
    keywords = []
    message_count = 11.0
    messages = ['144657', '144659', '144709', '144804', '144805', '144807', '144808', '144809', '144842', '144843', '144845']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'amaury.forgeotdarc', 'ezio.melotti', 'roger.serwy', 'jfalskfjdsl;akfdjsa;l.laksfj;aslkfdj;sal']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '11437'
    type = 'crash'
    url = 'https://bugs.python.org/issue13071'
    versions = ['Python 3.2']

    @jfalskfjdslakfdjsallaksfjaslkfdjsal
    Copy link
    Mannequin Author

    I have tried all ways of opening IDLE and have uninstalled and reinstalled Python, but when I try to open it it crashes before anything happens

    @jfalskfjdslakfdjsallaksfjaslkfdjsal jfalskfjdslakfdjsallaksfjaslkfdjsal mannequin added topic-IDLE type-crash A hard crash of the interpreter, possibly with a core dump labels Sep 30, 2011
    @ezio-melotti
    Copy link
    Member

    Try to open cmd (win+r -> type 'cmd' -> press enter), cd in the Python directory and do "python.exe Lib\idlelib\idle.py".
    If that doesn't work it should give you a traceback. Once you get the traceback copy/paste it here, so we can figure out what's going on.

    @terryjreedy
    Copy link
    Member

    IDLE with Py3.2.2 works fine on Win 7 for me (desktop) and daughter (laptop), so there is something peculiar with your system.

    @jfalskfjdslakfdjsallaksfjaslkfdjsal
    Copy link
    Mannequin Author

    Traceback (most recent call last):
      File "C:\Python32\Lib\idlelib/idle.py", line 11, in <module>
        idlelib.PyShell.main()
      File "C:\Python32\Lib\idlelib\PyShell.py",line 1377, in main
        shell = flist.open_shell()
      File "C:\Python32\Lib\idlelib\PyShell.py", line 273, in open_shell
        self.pyshell = PyShell(self)
      File "C:\Python32\Lib\idlelib\Pyshell.py", line 802, in __init__
        OutputWindow.__init__(self,flist, none, none)
      File "C:\Python32\Lib\idlelib\OutputWindow.py", line 16, in __init__
        EditorWindow.__init__(self,*args)
      File "C:\Python32\Lib\idlelib\EditorWindow.py", line 145, in __init__
        self.aply_bindings()
      File "C:\Python32\Lib\idlelib\EditorWindow.py", line 985, in apply_bindings
        text.event_add(event, *keylist)
      File "C:\Python32\Lib\idlelib\MultiCall.py", line 359, in event_add
        widget.event_add(self, virtual, seq)
      File C:\Python32\Lib\tkinter\__init__.py", line 1353, in event_add
        self.tk.call(args)
    _tkinter.TclError: bad event type or keysym "Alt"

    @jfalskfjdslakfdjsallaksfjaslkfdjsal
    Copy link
    Mannequin Author

    That is the traceback given when I run idle.py through windows command prompt

    @terryjreedy
    Copy link
    Member

    Are you using the .msi installer from python.org?
    Or one from activestate or enthought?

    @ezio-melotti
    Copy link
    Member

    Are you using some "unusual" keyboard layout?

    @amauryfa
    Copy link
    Member

    amauryfa commented Oct 3, 2011

    This issue is very similar to bpo-5707: it is possible to define a custom key binding to "<Alt>" or "<Control>": just click the Alt box and don't select a letter.
    There is no check, it's possible to save this buggy key binding, and IDLE won't start anymore.

    IDLE should:

    • check the validity of the binding and refuse to save it when it is invalid
    • gracefully skip invalid bindings from the config file

    @jfalskfjdslakfdjsallaksfjaslkfdjsal
    Copy link
    Mannequin Author

    ok i have solved the problem it was the same as bpo-4765

    @amauryfa
    Copy link
    Member

    amauryfa commented Oct 3, 2011

    What did you do to solve the problem?

    @terryjreedy
    Copy link
    Member

    While this issue and bpo-4765 are about the same effect, with a similar workaround, Amaury has indentified a separate bug in the custom key mechanism. So I retitled it to refer to that bug.

    @terryjreedy terryjreedy changed the title IDLE refuses to open on windows 7 IDLE accepts, then crashes, on invalid key bindings. Oct 3, 2011
    @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-IDLE type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants