Skip to content

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

Closed

Description

@jfalskfjdslakfdjsallaksfjaslkfdjsal
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']

    Activity

    1. jfalskfjdslakfdjsallaksfjaslkfdjsal commented on Sep 30, 2011

      jfalskfjdslakfdjsallaksfjaslkfdjsalmannequin
      MannequinAuthor

      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

    2. ezio-melotti commented on Sep 30, 2011

      @ezio-melotti
      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.

    3. terryjreedy commented on Sep 30, 2011

      @terryjreedy
      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.

    4. jfalskfjdslakfdjsallaksfjaslkfdjsal commented on Oct 3, 2011

      jfalskfjdslakfdjsallaksfjaslkfdjsalmannequin
      MannequinAuthor
      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"
    5. jfalskfjdslakfdjsallaksfjaslkfdjsal commented on Oct 3, 2011

      jfalskfjdslakfdjsallaksfjaslkfdjsalmannequin
      MannequinAuthor

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

    6. terryjreedy commented on Oct 3, 2011

      @terryjreedy
      Member

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

    7. ezio-melotti commented on Oct 3, 2011

      @ezio-melotti
      Member

      Are you using some "unusual" keyboard layout?

    8. amauryfa commented on Oct 3, 2011

      @amauryfa
      Contributor

      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
    9. jfalskfjdslakfdjsallaksfjaslkfdjsal commented on Oct 3, 2011

      jfalskfjdslakfdjsallaksfjaslkfdjsalmannequin
      MannequinAuthor

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

    10. amauryfa commented on Oct 3, 2011

      @amauryfa
      Contributor

      What did you do to solve the problem?

    11. terryjreedy commented on Oct 3, 2011

      @terryjreedy
      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.

    12. changed the title [-]IDLE refuses to open on windows 7[/-] [+]IDLE accepts, then crashes, on invalid key bindings.[/+] on Oct 3, 2011
    13. 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

      topic-IDLEtype-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions