Skip to content
This repository has been archived by the owner on Apr 6, 2018. It is now read-only.

Uncaught TypeError: Cannot read property '0' of undefined #703

Closed
oknixus opened this issue Jun 16, 2015 · 7 comments
Closed

Uncaught TypeError: Cannot read property '0' of undefined #703

oknixus opened this issue Jun 16, 2015 · 7 comments

Comments

@oknixus
Copy link

oknixus commented Jun 16, 2015

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.209.0
System: Unknown Windows Version
Thrown From: vim-mode package, v0.53.0

Stack Trace

Uncaught TypeError: Cannot read property '0' of undefined

At C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\text-buffer\lib\marker-store.js:204

TypeError: Cannot read property '0' of undefined
  at MarkerStore.module.exports.MarkerStore.restoreFromSnapshot (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\text-buffer\lib\marker-store.js:204:35)
  at TextBuffer.module.exports.TextBuffer.undo (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:715:33)
  at TextEditor.module.exports.TextEditor.undo (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\src\text-editor.js:1138:19)
  at VimState.module.exports.VimState.undo (C:\Users\KJRS-Nixus\.atom\packages\vim-mode\lib\vim-state.coffee:239:13)
  at atom-text-editor.registerCommands.undo (C:\Users\KJRS-Nixus\.atom\packages\vim-mode\lib\vim-state.coffee:71:23)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\src\command-registry.js:238:29)
  at C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\src\command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\KJRS-Nixus\AppData\Local\atom\app-0.209.0\resources\app.asar\src\window-event-handler.js:177:20)

Commands

     -0:53.2.0 ex-mode:open (atom-text-editor.editor.vim-mode.is-focused.command-mode)
     -0:53.2.0 blur (atom-text-editor.editor.vim-mode.is-focused.command-mode)
     -0:52.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -0:52.7.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:49 ex-mode:open (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:48.9.0 blur (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:40.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -0:40.3.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:36.6.0 vim-mode:undo (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  2x -0:16.4.0 blur (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  2x -0:11.9.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.command-mode.is-focused)
 22x -0:11.4.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  6x -0:09.8.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  4x -0:08.6.0 blur (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:02.2.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  2x -0:01.5.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.command-mode.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "minimap",
      "bracket-close-jump",
      "autohide-tree-view",
      "atom-beautify",
      "jsformat",
      "jumpy",
      "atom-html-preview",
      "atom-jshint",
      "autoclose-html",
      "color-picker",
      "docblockr",
      "jshint",
      "language-smarty-php",
      "linter",
      "linter-jshint",
      "react",
      "react-snippets",
      "tabularize",
      "turbo-javascript"
    ],
    "themes": [
      "seti-ui",
      "one-dark-syntax"
    ]
  },
  "vim-mode": {
    "useSmartcaseForSearch": true
  }
}

Installed Packages

# User
ex-mode, v0.5.1
seti-ui, v0.7.1
turbo-javascript, v1.1.3
vim-mode, v0.53.0

# Dev
No dev packages
@jazzpi
Copy link

jazzpi commented Jun 16, 2015

I just encountered the same error after undoing an ex-mode :s with u.

@jazzpi
Copy link

jazzpi commented Jun 16, 2015

This also occurs if undoing that with Ctrl-Z. Might be related to atom/atom#7124, atom/atom#6982 and atom/atom#6757.
I'll open an issue on ex-mode since it seems like that's the issue here.

@maxbrunsfeld
Copy link
Contributor

Is this still happening to you on Atom 0.210 and vim-mode 0.53?

@jazzpi
Copy link

jazzpi commented Jun 18, 2015

This error still occurs when undoing an ex-mode :s, but that should be fixed when lloeki/ex-mode#59 gets merged. I don't know how @NixusCN encountered this error, but it looks like it happened after undoing a :s too.

@bronson
Copy link
Contributor

bronson commented Jun 26, 2015

Just happened to me on 1.0 / 0.54 / 0.5.1. Undoing an :s.

@rnh
Copy link

rnh commented Jul 15, 2015

Just happened to me on 1.0.2 / 0.55 / 0.5.1 when undoing a :s. Looks like there hasn't been a release of ex-mode since lloeki/ex-mode#59 was merged.

@winstliu winstliu added the bug label Jul 15, 2015
@lee-dohm
Copy link
Contributor

lee-dohm commented Apr 5, 2018

As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the vim-mode-plus package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions!

@lee-dohm lee-dohm closed this as completed Apr 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants