atom / atom-keymap

Atom's selector-based keymap system
MIT License
105 stars 58 forks source link

recursive pending state termination issue... #120

Closed a-laughlin closed 8 years ago

a-laughlin commented 8 years ago

The error gets thrown from a package, but the recusion seems to be coming from keymap manager, so posting in both. https://github.com/EXSyst/recent-projects/issues/42

lee-dohm commented 8 years ago

Can you reproduce this issue in Safe Mode? To launch Safe Mode:

  1. Completely exit all instances of Atom
  2. Launch Atom with the command atom --safe
a-laughlin commented 8 years ago

Figured out how to reproduce the problem consistently in safe mode now. Just did it three times and got three different stack traces - two originating from keymap-manager.js (lines 494 & 533), and one originating from atom-space-pen-views (but thrown from keybinding resolver).

gists of all three: https://gist.github.com/a-laughlin/164fa928a31982bbeda4b3eb51649dd0 https://gist.github.com/a-laughlin/bb0a6997c4a8b7e588a12c544dc7d32e https://gist.github.com/a-laughlin/efeeef5086c6171966ea39809373a1d1

Did it a few more times and all threw at keymap-manager.js 533. Stack trace for one of those at https://gist.github.com/a-laughlin/8fcdac5bc0cde7d839288a6626706c08

Hmm. Something new. The error notifications with that latest stacks also say the issue has already been reported, with a link to https://github.com/atom/atom/issues/6102. I didn't notice whether the messages with the earlier stack traces had that message.

Anyway. To reproduce, hold down the cmd and type tst (cmd-t cmd-s cmd-t). Atom locks up.

For context, here are related keybindings I've been experimenting with:

'body.platform-darwin atom-workspace':
  'cmd-t cmd-s cmd-j': 'pane:split-left-moving-current-tab'
  'cmd-t cmd-s cmd-l': 'pane:split-right-moving-current-tab'
  'cmd-t cmd-s cmd-i': 'pane:split-up-moving-current-tab'
  'cmd-t cmd-s cmd-k': 'pane:split-down-moving-current-tab'
  'cmd-t cmd-n cmd-j': 'pane:split-left-creating-empty-pane'
  'cmd-t cmd-n cmd-l': 'pane:split-right-creating-empty-pane'
  'cmd-t cmd-n cmd-i': 'pane:split-up-creating-empty-pane'
  'cmd-t cmd-n cmd-k': 'pane:split-down-creating-empty-pane'
  'cmd-t cmd-l': 'pane:show-next-item'
  'cmd-t cmd-j': 'pane:show-previous-item'
  'cmd-t cmd-i': 'window:focus-previous-pane'
  'cmd-t cmd-k': 'window:focus-next-pane'
  'cmd-t cmd-m':  'pane:merge-all-panes'
  'cmd-t cmd-t': 'tree-view:toggle'

HTH

a-laughlin commented 8 years ago

Did some digging. May have been fixed at https://github.com/atom/atom/issues/11203

nathansobo commented 8 years ago

@a-laughlin Can you give 1.7.0-beta4 a try. I juts pushed what I hope should be a fix, though there may be other evil cases lurking.