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

Uncaught TypeError: Cannot read property 'tree' of null #1154

Open
solsticedhiver opened this issue Oct 4, 2021 · 2 comments
Open

Uncaught TypeError: Cannot read property 'tree' of null #1154

solsticedhiver opened this issue Oct 4, 2021 · 2 comments

Comments

@solsticedhiver
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.58.0 x64
Electron: 9.4.4
OS: "Arch Linux"
Thrown From: vim-mode-plus package 1.36.6

Stack Trace

Uncaught TypeError: Cannot read property 'tree' of null

At /home/solstice/.atom/packages/vim-mode-plus/lib/operation-stack.js:164

TypeError: Cannot read property 'tree' of null
    at TreeSitterLanguageMode.get tree [as tree] (/usr/lib/atom/src/tree-sitter-language-mode.js:134:35)
    at TreeSitterLanguageMode.getFoldableRangeContainingPoint (/usr/lib/atom/src/tree-sitter-language-mode.js:300:15)
    at TextEditor.foldBufferRow (/usr/lib/atom/src/text-editor.js:4793:22)
    at Search.restoreEditorState (/packages/vim-mode-plus/lib/utils.js:69:16)
    at Search.moveCursor (/packages/vim-mode-plus/lib/motion-search.js:74:14)
    at Search.moveWithSaveJump (/packages/vim-mode-plus/lib/motion.js:48:10)
    at Search.execute (/packages/vim-mode-plus/lib/motion.js:61:14)
    at OperationStack.execute (/packages/vim-mode-plus/lib/operation-stack.js:200:33)
    at OperationStack.process (/packages/vim-mode-plus/lib/operation-stack.js:193:12)
    at OperationStack.run (/packages/vim-mode-plus/lib/operation-stack.js:105:14)
    at OperationStack.runRecordedMotion (/packages/vim-mode-plus/lib/operation-stack.js:150:10)
    at OperationStack.runCurrentSearch (/packages/vim-mode-plus/lib/operation-stack.js:159:10)
    at /packages/vim-mode-plus/lib/main.js:162:62)
    at HTMLElement.didDispatch (/packages/vim-mode-plus/lib/main.js:187:50)
    at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:405:43)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:617:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:408:22)
    at WindowEventHandler.handleDocumentKeyEvent (/usr/lib/atom/src/window-event-handler.js:153:34)

Commands

     -2:25.3.0 vim-mode-plus:set-register-name (input.hidden-input)
     -2:25.1.0 vim-mode-plus:set-input-char-a (input.hidden-input)
     -2:24.9.0 vim-mode-plus:put-after (input.hidden-input)
     -2:23.8.0 ex-mode:open (input.hidden-input)
  3x -2:23.8.0 blur (input.hidden-input)
     -2:23.5.0 core:confirm (input.hidden-input)
 10x -2:23.5.0 blur (input.hidden-input)
     -0:25.5.0 vim-mode-plus:fold-all (input.hidden-input)
     -0:24.6.0 vim-mode-plus:search (input.hidden-input)
  3x -0:24.6.0 blur (input.hidden-input)
  2x -0:23 core:backspace (input.hidden-input)
     -0:21.2.0 core:confirm (input.hidden-input)
  8x -0:21.2.0 blur (input.hidden-input)
     -0:09.2.0 vim-mode-plus:repeat-search (input.hidden-input)
     -0:02.8.0 vim-mode-plus:reset-normal-mode (input.hidden-input)
  4x -0:02.2.0 blur (input.hidden-input)

Non-Core Packages

atom-jinja2 0.6.0 
cursor-history 0.14.0 
ex-mode 0.18.0 
file-icons 2.1.47 
language-meson 0.2.5 
minimap 4.40.0 
open-this 0.5.0 
pigments 0.40.6 
vim-mode-plus 1.36.6 
@t9md
Copy link
Owner

t9md commented Oct 7, 2021

I think this should be reported on Atom or TreeShitter, I cannot fix this with vmp side.

@solsticedhiver
Copy link
Author

solsticedhiver commented Oct 7, 2021

Well, this was an automatic bug report. I was pressing 'n' to find the next occurence of a search. I don't know what triggered this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants