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 'getSelections' of null #4

Closed
MiquelAdell opened this issue Feb 10, 2015 · 4 comments
Closed

Comments

@MiquelAdell
Copy link

[Enter steps to reproduce below:]

  1. close minimap using [cmd]+[shift]+[p] -> "minmap: toggle"

Really I did nothing different than my usuarl toggling of the minimap. Don't know why it failed this time.

Atom Version: 0.177.0
System: Mac OS X 10.10.1
Thrown From: minimap-selection package, v3.1.1

Stack Trace

Uncaught TypeError: Cannot read property 'getSelections' of null

At /Users/miquel/.atom/packages/minimap-selection/lib/minimap-selection-view.coffee:27

TypeError: Cannot read property 'getSelections' of null
  at MinimapSelectionView.module.exports.MinimapSelectionView.handleSelection (/Users/miquel/.atom/packages/minimap-selection/lib/minimap-selection-view.coffee:27:5)
  at /Users/miquel/.atom/packages/minimap-selection/lib/minimap-selection-view.coffee:1:1
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.cursorMoved (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1680:27)
  at /Applications/Atom.app/Contents/Resources/app/src/cursor.js:62:31
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Marker.module.exports.Marker.notifyObservers (/Applications/Atom.app/Contents/Resources/app/src/marker.js:298:22)
  at /Applications/Atom.app/Contents/Resources/app/src/marker.js:56:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/service-hub/node_modules/event-kit/lib/emitter.js:82:11)
  at Marker.module.exports.Marker.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/marker.js:538:22)
  at Marker.module.exports.Marker.update (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/marker.js:398:14)
  at Marker.module.exports.Marker.setHeadPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/marker.js:191:19)
  at Marker.module.exports.Marker.setHeadBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/marker.js:207:32)
  at Marker.module.exports.Marker.setHeadScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/marker.js:218:19)
  at /Applications/Atom.app/Contents/Resources/app/src/cursor.js:126:31
  at Cursor.module.exports.Cursor.changePosition (/Applications/Atom.app/Contents/Resources/app/src/cursor.js:692:7)
  at Cursor.module.exports.Cursor.setScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/cursor.js:124:19)
  at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1381:23
  at TextEditor.module.exports.TextEditor.moveCursors (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1673:9)
  at TextEditor.module.exports.TextEditor.setCursorScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1380:19)
  at [object Object].module.exports.React.createClass.onMouseDown (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:760:20)
  at HTMLDivElement.boundMethod (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21)

Commands

     -4:48.5 fuzzy-finder:toggle-file-finder (atom-text-editor.editor)
     -4:46.5 core:confirm (atom-text-editor.editor.mini)
     -4:44.0 core:close (atom-text-editor.editor)
     -0:42.4 fuzzy-finder:toggle-file-finder (atom-text-editor.editor)
     -0:40.4 core:confirm (atom-text-editor.editor.mini)
     -0:37.9 core:undo (atom-text-editor.editor.autocomplete-active.is-focused)
  4x -0:37.2 core:page-up (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:32.8 core:move-left (atom-text-editor.editor.autocomplete-active.is-focused)
  5x -0:31.0 core:move-up (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:30.3 core:move-left (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:26.9 autocomplete-plus:confirm (atom-text-editor.editor.autocomplete-active.is-focused)
  2x -0:08.2 core:move-down (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:05.4 tree-view:toggle (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:04.8 command-palette:toggle (atom-text-editor.editor.autocomplete-active.is-focused)
     -0:03.4 core:confirm (atom-text-editor.editor.mini)
     -0:03.4 minimap:toggle (atom-text-editor.editor.autocomplete-active.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "disabledPackages": [
      "wrap-guide",
      "whitespace",
      "preview-tabs",
      "term2",
      "atom-ctags"
    ],
    "themes": [
      "seti-ui",
      "seti-syntax"
    ],
    "projectHome": "/Users/miquel/code",
    "excludeVcsIgnoredPaths": false
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.2.3
auto-detect-indentation, v0.3.0
autocomplete-plus, v2.1.3
autocomplete-snippets, v1.0.1
color-picker, v1.4.4
compare-files, v0.4.0
git-tab-status, v1.5.3
highlight-selected, v0.7.0
linter, v0.11.1
minimap, v4.1.3
minimap-find-and-replace, v3.1.0
minimap-git-diff, v3.1.1
minimap-highlight-selected, v4.0.0
minimap-selection, v3.1.1
project-manager, v1.15.5
remember-session, v0.5.1
remote-sync, v2.3.1
seti-syntax, v0.3.1
seti-ui, v0.6.3
tabs-to-spaces, v0.8.1

# Dev
No dev packages

/cc @atom/core

@MiquelAdell
Copy link
Author

as a side note.... If I close the exception notice window on atom and click on the main edit buffer I get the error again.

Closing and openning atom stopped this from happening.

@MiquelAdell
Copy link
Author

Thanks for your ansewer @fundon but i'm consistently getting the error now with minimap v4.1.3 and atom happily states that All your installed packages are up to date!

I can now reproduce de problem by starting atom, toggling the minmap off and trying to edit the buffer.

This did not happen prior to updating my packages... this morning. I think minmap did not update and it worked yesterday.

I guess it is some conflict with some other package.

EDIT: BTW leaving minmap open does avoid the problem.

@fundon
Copy link
Member

fundon commented Feb 10, 2015

I can now reproduce de problem by starting atom, toggling the minmap off and trying to edit the buffer.

The toggling issue was fixed in minimap v4.1.1. atom-minimap/minimap#255.

You can disable the minimap-selection, the minimap-selection has some compatible problems with the Minimap V4.

@abe33 abe33 closed this as completed in c65692b Feb 10, 2015
@abe33
Copy link
Contributor

abe33 commented Feb 10, 2015

The issue was caused because the plugin didn't destroy its views when a minimap was destroyed (which occurs on minimap toggling)

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

No branches or pull requests

3 participants