atom-vim-mode-plus icon indicating copy to clipboard operation
atom-vim-mode-plus copied to clipboard

Uncaught RangeError: Invalid array length

Open robbydaigle opened this issue 10 years ago • 6 comments

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.1 System: Mac OS X 10.11.1 Thrown From: vim-mode-plus package, v0.8.0

Stack Trace

Uncaught RangeError: Invalid array length

At /Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:30

RangeError: Invalid array length
    at Object._.times (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/node_modules/underscore/underscore.js:1118:17)
    at MoveToFirstCharacterOfLineDown.Motion.countTimes (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/motion.coffee:88:7)
    at MoveToFirstCharacterOfLineDown.moveCursor (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/motion.coffee:351:6)
    at /Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/motion.coffee:43:8
    at TextEditor.module.exports.TextEditor.moveCursors (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1638:9)
    at MoveToFirstCharacterOfLineDown.Motion.execute (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/motion.coffee:42:13)
    at OperationStack.process (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:80:8)
    at OperationStack.run (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/operation-stack.coffee:27:8)
    at run (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/base.coffee:12:27)
    at atom-text-editor.<anonymous> (/Users/crunchyturtle/.atom/packages/vim-mode-plus/lib/base.coffee:140:65)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

 11x -1:39.4.0 blur (atom-pane.pane.active)
     -0:22.6.0 bracket-matcher:remove-brackets-from-selection (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  8x -0:06.5.0 vim-mode-plus:set-count (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  4x -0:04.9.0 core:move-left (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused.with-count)
 13x -0:03.4.0 vim-mode-plus:set-count (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused.with-count)
     -0:00.7.0 vim-mode-plus:move-to-first-character-of-line-down (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused.with-count)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "gruvbox"
    ]
  }
}

Installed Packages

# User
browser-plus, v0.0.54
gruvbox, v1.0.5
linter, v1.11.3
linter-flow, v4.0.1
markdown-preview-plus, v2.1.1
node-debugger, v1.3.0
terminal-plus, v0.14.5
vim-mode-plus, v0.8.0

# Dev
No dev packages

robbydaigle avatar Dec 13 '15 03:12 robbydaigle

Ok. I think the issue has something to do with Dvorak - Qwerty ⌘ keyboard layout in OSX. I was attempting to move by paragraph and I got this... Regular dvorak mode seems to work fine, so I'll just stick to that.

robbydaigle avatar Dec 13 '15 03:12 robbydaigle

Closing.

robbydaigle avatar Dec 13 '15 03:12 robbydaigle

Ok, even if that, throwing error is type of bug I want to avoid. Its strange you report using atom v1.3.1 but stacktrace includes PATH like /opt/homebrew-cask/Caskroom/atom/1.0.11/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/node_modules/underscore/underscore.js

Aren't you using atom v1.0.11?

t9md avatar Dec 13 '15 03:12 t9md

It appears homebrew didn't update the path. I'm using 1.3.1.

robbydaigle avatar Dec 14 '15 04:12 robbydaigle

So you WERE using 1.0.11 when issue happened?

t9md avatar Dec 14 '15 05:12 t9md

The 'about atom' said 1.3.1 even though the path for it was 1.0.11. Sorry for the confusion.

robbydaigle avatar Dec 14 '15 15:12 robbydaigle