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: Invalid Point: (NaN, 0) #626

Closed
hultberg opened this issue Aug 23, 2017 · 30 comments · Fixed by #633
Closed

Uncaught TypeError: Invalid Point: (NaN, 0) #626

hultberg opened this issue Aug 23, 2017 · 30 comments · Fixed by #633
Labels

Comments

@hultberg
Copy link
Contributor

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.20.0-beta3 x64
Electron: 1.6.9
OS: linux 4.12.6-1-ARCH
Thrown From: minimap-plus package 4.29.2

Stack Trace

Uncaught TypeError: Invalid Point: (NaN, 0)

At /usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/point.js:63

TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/point.js:63:21)
    at DisplayLayer.translateScreenPosition (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/display-layer.js:333:17)
    at DisplayLayer.clipScreenPosition (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/display-layer.js:391:18)
    at TextEditor.module.exports.TextEditor.clipScreenPosition (/usr/share/atom-beta/resources/app/src/text-editor.js:1794:38)
    at HTMLElement.pixelPositionForScreenPosition (/usr/share/atom-beta/resources/app/src/text-editor-element.js:242:38)
    at StableAdapter.computeScrollTop (/packages/minimap-plus/lib/adapters/stable-adapter.js:60:42)
    at StableAdapter.getScrollTop (/packages/minimap-plus/lib/adapters/stable-adapter.js:51:17)
    at Minimap.getTextEditorScrollRatio (/packages/minimap-plus/lib/minimap.js:598:25)
    at Minimap.getCapedTextEditorScrollRatio (/packages/minimap-plus/lib/minimap.js:610:29)
    at Minimap.getScrollTopFromEditor (/packages/minimap-plus/lib/minimap.js:933:12)
    at Minimap.getScrollTop (/packages/minimap-plus/lib/minimap.js:887:14)
    at Minimap.getLastVisibleScreenRow (/packages/minimap-plus/lib/minimap.js:865:13)
    at Minimap.emitRangeChanges (/packages/minimap-plus/lib/mixins/decoration-management.js:503:38)
    at Minimap.emitDecorationChanges (/packages/minimap-plus/lib/mixins/decoration-management.js:488:10)
    at Minimap.decorateMarker (/packages/minimap-plus/lib/mixins/decoration-management.js:418:10)
    at MinimapHighlightSelected.markerCreated (/packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:53:26)
    at MinimapHighlightSelected.markerCreated (/packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:1:1)
    at /packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:39:62
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:163:20
    at ForwardsSingleLine.iterate (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/match-iterator.js:94:17)
    at TextBuffer.module.exports.TextBuffer.scanInRange (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/text-buffer.js:1033:29)
    at TextEditor.module.exports.TextEditor.scanInBufferRange (/usr/share/atom-beta/resources/app/src/text-editor.js:2737:32)
    at HighlightedAreaView.module.exports.HighlightedAreaView.highlightSelectionInEditor (/packages/highlight-selected/lib/highlighted-area-view.coffee:151:12)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:136:10
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:135:27)
    at HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:62:8

Commands

     -0:42.1.0 core:confirm (input.hidden-input)
  3x -0:42 blur (input.hidden-input)
     -0:39.8.0 intentions:highlight (input.hidden-input)
     -0:39.4.0 fuzzy-finder:toggle-file-finder (input.hidden-input)
  3x -0:39.4.0 blur (input.hidden-input)
     -0:37.9.0 core:confirm (input.hidden-input)
 16x -0:37.9.0 blur (input.hidden-input)
     -0:17.9.0 vim-mode-plus:move-down (input.hidden-input)
     -0:17.7.0 intentions:highlight (input.hidden-input)
  9x -0:17.6.0 editor:move-to-beginning-of-word (input.hidden-input)
     -0:15.6.0 vim-mode-plus:activate-insert-mode (input.hidden-input)
     -0:15.4.0 intentions:highlight (input.hidden-input)
     -0:15.2.0 editor:select-to-end-of-word (input.hidden-input)
     -0:14.5.0 core:backspace (input.hidden-input)
  2x -0:14 core:delete (input.hidden-input)
  4x -0:11.4.0 blur (input.hidden-input)

Non-Core Packages

advanced-open-file 0.16.6 
atom-clock 0.1.13 
atom-material-syntax 1.0.6 
atom-material-syntax-dark 0.2.7 
atom-material-ui 2.0.4 
busy-signal 1.4.3 
docblockr 0.11.0 
editorconfig 2.2.2 
ex-mode-hb 0.16.0 
file-icons 2.1.10 
file-watcher 1.1.0 
fuzzy-finder-hb 1.5.8 
highlight-selected 0.13.1 
hyperclick 0.1.3 
intentions 1.1.5 
language-blade 0.34.0 
language-diff 0.7.0 
language-docker 1.1.8 
language-ini 1.19.0 
language-nginx 0.8.0 
language-vue 0.23.1 
less-than-slash 0.17.0 
linter 2.2.0 
linter-eslint 8.2.1 
linter-ui-default 1.6.4 
minimap-find-and-replace 4.5.2 
minimap-hide 0.3.0 
minimap-highlight-selected 4.6.1 
minimap-plus 4.29.2 
minimap-selection 4.5.0 
nord-atom-ui 0.11.0 
northem-dark-atom-ui 2.1.0 
nucleus-dark-ui 0.12.3 
package-sync 1.1.0 
php-cs-fixer 4.1.0 
php-integrator-annotations 1.2.0 
php-integrator-autocomplete-plus 1.6.0 
php-integrator-base 3.0.1 
php-integrator-navigation 1.2.1 
php-integrator-refactoring 1.4.1 
php-twig 4.0.0 
project-manager 3.3.5 
vim-mode-plus 0.96.2 
vim-mode-plus-keymaps-for-surround 0.2.1 
wakatime 7.0.3 
@MuddyPuddles4325
Copy link

This is easily reproducible for me when ever you right click on a tab and choose "split left", no split happens but when I restart the split is now visible

@maewolfsky
Copy link

[Enter steps to reproduce:]

  1. Fullscreen Atom
  2. Try to open a file with "Split Right"

Atom: 1.19.3 x64
Electron: 1.6.9
OS: Mac OS X 10.11.6
Thrown From: minimap package 4.29.6

Stack Trace

Uncaught TypeError: Invalid Point: (NaN, 0)

At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63

TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63:21)
    at DisplayLayer.translateScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:333:17)
    at DisplayLayer.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:391:18)
    at TextEditor.module.exports.TextEditor.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1794:38)
    at HTMLElement.pixelPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:242:38)
    at StableAdapter.computeScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:60:42)
    at StableAdapter.getScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:51:17)
    at Minimap.getTextEditorScrollRatio (/packages/minimap/lib/minimap.js:598:25)
    at Minimap.getCapedTextEditorScrollRatio (/packages/minimap/lib/minimap.js:610:29)
    at Minimap.getScrollTopFromEditor (/packages/minimap/lib/minimap.js:937:12)
    at Minimap.getScrollTop (/packages/minimap/lib/minimap.js:887:14)
    at Minimap.getLastVisibleScreenRow (/packages/minimap/lib/minimap.js:865:13)
    at Minimap.emitRangeChanges (/packages/minimap/lib/mixins/decoration-management.js:504:38)
    at Minimap.emitDecorationChanges (/packages/minimap/lib/mixins/decoration-management.js:489:10)
    at Minimap.decorateMarker (/packages/minimap/lib/mixins/decoration-management.js:422:10)
    at MinimapCursorLineBinding.handleMarker (/packages/minimap-cursorline/lib/minimap-cursorline-binding.js:21:37)
    at /packages/minimap-cursorline/lib/minimap-cursorline-binding.js:15:12
    at TextEditor.module.exports.TextEditor.observeCursors (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:745:15)
    at /packages/minimap-cursorline/lib/minimap-cursorline-binding.js:14:40)
    at /packages/minimap-cursorline/lib/minimap-cursorline.js:40:23
    at onDidCreateMinimap (/packages/minimap/lib/main.js:380:51)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at subscriptions.add.atom.workspace.observeTextEditors (/packages/minimap/lib/main.js:393:20)
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:721:22
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:594:34
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:595:19
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at PaneContainer.didAddPaneItem (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:270:24)
    at PaneContainer.didAddPane (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:242:18)
    at Pane.module.exports.Pane.setContainer (/Applications/Atom.app/Contents/Resources/app/src/pane.js:162:32)
    at PaneAxis.module.exports.PaneAxis.addChild (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:154:19)
    at PaneAxis.module.exports.PaneAxis.insertChildAfter (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:225:25)
    at Pane.module.exports.Pane.split (/Applications/Atom.app/Contents/Resources/app/src/pane.js:1004:29)
    at Pane.module.exports.Pane.splitRight (/Applications/Atom.app/Contents/Resources/app/src/pane.js:964:25)
    at TabBarView.module.exports.TabBarView.splitTab (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:380:37)
    at Object.TabBarView.addElementCommands.tabs:split-right (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:137:32)
    at HTMLUListElement.commandsWithPropagationStopped.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:83:42)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:25)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1344:34)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:347:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

  2x -0:27.5.0 core:move-up (input.hidden-input)
 16x -0:27.1.0 core:move-left (input.hidden-input)
     -0:25.9.0 core:move-right (input.hidden-input)
     -0:25.6.0 core:backspace (input.hidden-input)
     -0:22.9.0 core:select-right (input.hidden-input)
     -0:22.1.0 editor:select-to-end-of-line (input.hidden-input)
     -0:21.7.0 core:backspace (input.hidden-input)
     -0:21.4.0 core:move-down (input.hidden-input)
 22x -0:21.2.0 core:move-right (input.hidden-input)
     -0:19 editor:select-to-end-of-line (input.hidden-input)
     -0:18.6.0 core:backspace (input.hidden-input)
  2x -0:18.3.0 core:move-up (input.hidden-input)
  2x -0:13.5.0 core:move-down (input.hidden-input)
     -0:13.1.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:12 core:move-down (input.hidden-input)
     -0:07.5.0 tabs:split-right (div.title.icon.default-icon.temp)

Non-Core Packages

atom-beautify 0.30.5 
busy-signal 1.4.3 
file-icons 2.1.11 
git-blame 1.2.1 
git-time-machine 1.5.9 
imdone-atom 2.2.6 
intentions 1.1.5 
language-chef 0.10.0 
language-crontab 1.0.0 
language-diff 0.7.0 
language-groovy 0.7.0 
language-lua 0.9.11 
language-r 0.4.1 
language-terraform 0.8.1 
linter 2.2.0 
linter-flake8 2.2.1 
linter-foodcritic 0.5.4 
linter-lua 1.0.4 
linter-rubocop 2.1.1 
linter-shellcheck 1.4.4 
linter-ui-default 1.6.7 
minimap 4.29.6 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-linter 2.0.2 
pretty-json 1.6.4 
tree-view-git-status 1.4.0 
url-encode 0.5.0 

@jolsen71
Copy link

jolsen71 commented Aug 29, 2017

I received this ("Uncaught TypeError: Invalid Point: (NaN, 0) thrown from minimap package") error when trying to use shortcut key to bring up a list of projects in the Package Manager package (vs splitting existing pane to a new pane).

@jeromelachaud
Copy link

[Enter steps to reproduce:]

  1. Open a file
  2. Click anywhere on it

Atom: 1.19.4 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: minimap package 4.29.6

Stack Trace

Uncaught TypeError: Invalid Point: (NaN, 0)

At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63

TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63:21)
    at DisplayLayer.translateScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:333:17)
    at DisplayLayer.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:391:18)
    at TextEditor.module.exports.TextEditor.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1794:38)
    at HTMLElement.pixelPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:242:38)
    at StableAdapter.computeScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:60:42)
    at StableAdapter.getScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:51:17)
    at Minimap.getTextEditorScrollRatio (/packages/minimap/lib/minimap.js:598:25)
    at Minimap.getCapedTextEditorScrollRatio (/packages/minimap/lib/minimap.js:610:29)
    at Minimap.getScrollTopFromEditor (/packages/minimap/lib/minimap.js:937:12)
    at Minimap.getScrollTop (/packages/minimap/lib/minimap.js:887:14)
    at Minimap.getLastVisibleScreenRow (/packages/minimap/lib/minimap.js:865:13)
    at Minimap.emitRangeChanges (/packages/minimap/lib/mixins/decoration-management.js:504:38)
    at Minimap.emitDecorationChanges (/packages/minimap/lib/mixins/decoration-management.js:489:10)
    at Minimap.removeAllDecorationsForMarker (/packages/minimap/lib/mixins/decoration-management.js:583:14)
    at /packages/minimap/lib/mixins/decoration-management.js:349:14)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at DisplayMarker.module.exports.DisplayMarker.didDestroyBufferMarker (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-marker.js:28:26)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-marker-layer.js:54:29
    at Set.forEach (native)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.didClearBufferMarkerLayer (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-marker-layer.js:53:46)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/marker-layer.js:104:28
    at Set.forEach (native)
    at MarkerLayer.module.exports.MarkerLayer.clear (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/marker-layer.js:103:38)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.clear (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-marker-layer.js:49:43)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.destroy (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-marker-layer.js:37:18)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:195:19
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeMarkers (/packages/highlight-selected/lib/highlighted-area-view.coffee:194:19)
    at HighlightedAreaView.removeMarkers (/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:94:6)
    at HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:62:8

Commands

     -1:24 intentions:highlight (input.hidden-input)
     -1:24 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)

Non-Core Packages

angularjs 0.4.0 
atom-beautify 0.30.5 
atom-bracket-highlight 0.3.2 
atom-jump-block 0.5.4 
atom-wrap-in-tag 0.6.0 
autoclose-html 0.23.0 
autocomplete-module-import 0.1.1 
autocomplete-modules 1.7.0 
base16-ocean-dark-spacegray 0.13.0 
better-window-title 1.0.3 
busy-signal 1.4.3 
css-in-js 1.1.0 
cssbeautify 1.3.0 
editorconfig 2.2.2 
emmet 2.4.3 
file-icons 2.1.11 
highlight-selected 0.13.1 
import-cost-atom 1.0.4 
intentions 1.1.5 
js-func-viewer 1.1.4 
language-babel 2.73.0 
letter-spacing 0.3.1 
linter 2.2.0 
linter-eslint 8.2.1 
linter-ui-default 1.6.8 
minimap 4.29.6 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-highlight-selected 4.6.1 
minimap-pigments 0.2.2 
minimap-quick-highlight 1.0.1 
oceanic-next 1.0.0 
open-project-file 1.1.1 
pigments 0.40.2 
platformio-ide-terminal 2.6.0 
react 0.16.2 
react-snippets 0.9.0 
single-click-open 0.2.2 
speed-bot 0.1.0 
sync-settings 0.8.3 
tree-view-open-files 0.3.0 
whitespacer 1.1.1 

@AndrewKubow
Copy link

AndrewKubow commented Aug 30, 2017

Same error on "split left" for tab. When restart, load splited without any issue.

@jfs
Copy link

jfs commented Sep 6, 2017

I use splits frequently and this is really obnoxious. Can this be prioritized for the next release?

@alice-em
Copy link

alice-em commented Sep 6, 2017

+1 for this error...

Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63
Hide Stack Trace
TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/point.js:63:21)
    at DisplayLayer.translateScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:333:17)
    at DisplayLayer.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:391:18)
    at TextEditor.module.exports.TextEditor.clipScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1794:38)
    at HTMLElement.pixelPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:242:38)
    at StableAdapter.computeScrollTop (/Users/alice_em/.atom/packages/minimap/lib/adapters/stable-adapter.js:60:42)
    at StableAdapter.getScrollTop (/Users/alice_em/.atom/packages/minimap/lib/adapters/stable-adapter.js:51:17)
    at Minimap.getTextEditorScrollRatio (/Users/alice_em/.atom/packages/minimap/lib/minimap.js:598:25)
    at Minimap.getCapedTextEditorScrollRatio (/Users/alice_em/.atom/packages/minimap/lib/minimap.js:610:29)
    at Minimap.getScrollTopFromEditor (/Users/alice_em/.atom/packages/minimap/lib/minimap.js:937:12)
    at Minimap.getScrollTop (/Users/alice_em/.atom/packages/minimap/lib/minimap.js:887:14)
    at Minimap.getLastVisibleScreenRow (/Users/alice_em/.atom/packages/minimap/lib/minimap.js:865:13)
    at Minimap.emitRangeChanges (/Users/alice_em/.atom/packages/minimap/lib/mixins/decoration-management.js:504:38)
    at Minimap.emitDecorationChanges (/Users/alice_em/.atom/packages/minimap/lib/mixins/decoration-management.js:489:10)
    at Minimap.decorateMarker (/Users/alice_em/.atom/packages/minimap/lib/mixins/decoration-management.js:422:10)
    at MinimapCursorLineBinding.handleMarker (/Users/alice_em/.atom/packages/minimap-cursorline/lib/minimap-cursorline-binding.js:21:37)
    at /Users/alice_em/.atom/packages/minimap-cursorline/lib/minimap-cursorline-binding.js:15:12
    at TextEditor.module.exports.TextEditor.observeCursors (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:745:15)
    at new MinimapCursorLineBinding (/Users/alice_em/.atom/packages/minimap-cursorline/lib/minimap-cursorline-binding.js:14:40)
    at /Users/alice_em/.atom/packages/minimap-cursorline/lib/minimap-cursorline.js:40:23
    at onDidCreateMinimap (/Users/alice_em/.atom/packages/minimap/lib/main.js:380:51)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at subscriptions.add.atom.workspace.observeTextEditors (/Users/alice_em/.atom/packages/minimap/lib/main.js:393:20)
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:721:22
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:594:34
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:595:19
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at PaneContainer.didAddPaneItem (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:270:24)
    at PaneContainer.didAddPane (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:242:18)
    at Pane.module.exports.Pane.setContainer (/Applications/Atom.app/Contents/Resources/app/src/pane.js:162:32)
    at PaneAxis.module.exports.PaneAxis.addChild (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:154:19)
    at PaneAxis.module.exports.PaneAxis.insertChildAfter (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:225:25)
    at Pane.module.exports.Pane.split (/Applications/Atom.app/Contents/Resources/app/src/pane.js:1004:29)
    at Pane.module.exports.Pane.splitDown (/Applications/Atom.app/Contents/Resources/app/src/pane.js:972:25)
    at TabBarView.module.exports.TabBarView.splitTab (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:380:37)
    at Object.TabBarView.addElementCommands.tabs:split-down (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:127:32)
    at HTMLUListElement.commandsWithPropagationStopped.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:83:42)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:25)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1344:34)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:347:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

@cyonder
Copy link

cyonder commented Sep 8, 2017

+1

@trin-cz
Copy link

trin-cz commented Sep 11, 2017

To work around, revert to Atom 1.18 (not so bad). Reverting minimap to older versions does not help.

@njcaballero
Copy link

+1

@gocarlos
Copy link

[Enter steps to reproduce:]

  1. try to split tab

Atom: 1.21.0-beta0 x64
Electron: 1.6.9
OS: Ubuntu 14.04.5
Thrown From: minimap package 4.29.6

Stack Trace

Uncaught TypeError: Invalid Point: (NaN, 0)

At /usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/point.js:63

TypeError: Invalid Point: (NaN, 0)
    at Function.module.exports.Point.assertValid (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/point.js:63:21)
    at DisplayLayer.translateScreenPosition (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/display-layer.js:333:17)
    at DisplayLayer.clipScreenPosition (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/display-layer.js:391:18)
    at TextEditor.module.exports.TextEditor.clipScreenPosition (/usr/share/atom-beta/resources/app/src/text-editor.js:1794:38)
    at HTMLElement.pixelPositionForScreenPosition (/usr/share/atom/resources/app/src/text-editor-element.js:242:38)
    at StableAdapter.computeScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:60:42)
    at StableAdapter.getScrollTop (/packages/minimap/lib/adapters/stable-adapter.js:51:17)
    at Minimap.getTextEditorScrollRatio (/packages/minimap/lib/minimap.js:598:25)
    at Minimap.getCapedTextEditorScrollRatio (/packages/minimap/lib/minimap.js:610:29)
    at Minimap.getScrollTopFromEditor (/packages/minimap/lib/minimap.js:937:12)
    at Minimap.getScrollTop (/packages/minimap/lib/minimap.js:887:14)
    at Minimap.getLastVisibleScreenRow (/packages/minimap/lib/minimap.js:865:13)
    at Minimap.emitRangeChanges (/packages/minimap/lib/mixins/decoration-management.js:504:38)
    at Minimap.emitDecorationChanges (/packages/minimap/lib/mixins/decoration-management.js:489:10)
    at Minimap.decorateMarker (/packages/minimap/lib/mixins/decoration-management.js:422:10)
    at MinimapHighlightSelected.markerCreated (/packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:53:26)
    at MinimapHighlightSelected.markerCreated (/packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:1:1)
    at /packages/minimap-highlight-selected/lib/minimap-highlight-selected.coffee:39:62
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:163:20
    at ForwardsSingleLine.iterate (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/match-iterator.js:94:17)
    at TextBuffer.module.exports.TextBuffer.scanInRange (/usr/share/atom-beta/resources/app/node_modules/text-buffer/lib/text-buffer.js:1031:29)
    at TextEditor.module.exports.TextEditor.scanInBufferRange (/usr/share/atom-beta/resources/app/src/text-editor.js:2737:32)
    at HighlightedAreaView.module.exports.HighlightedAreaView.highlightSelectionInEditor (/packages/highlight-selected/lib/highlighted-area-view.coffee:151:12)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:136:10
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:135:27)
    at HighlightedAreaView.handleSelection (/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at /packages/highlight-selected/lib/highlighted-area-view.coffee:62:8

Commands

     -6:44.3.0 intentions:highlight (input.hidden-input)
     -6:35.6.0 split-diff:toggle (input.hidden-input)
     -6:27.6.0 intentions:highlight (input.hidden-input)
     -6:27.1.0 split-diff:toggle (input.hidden-input)
     -5:11.2.0 core:backspace (input.hidden-input)
     -5:06.6.0 intentions:highlight (input.hidden-input)
     -5:06.2.0 core:save (input.hidden-input)
     -4:59.3.0 git-control:toggle (input.hidden-input)
     -4:22 github:toggle-git-tab (input.hidden-input)
     -4:16.2.0 github:discard-changes-in-selected-files (span.github-FilePatchListView-path)
     -3:14.6.0 tabs:split-left (div.title.icon.terminal-icon.medium-purple.temp)
     -0:24.9.0 core:backspace (input.hidden-input)
     -0:23.5.0 core:delete (input.hidden-input)
  7x -0:19.7.0 core:backspace (input.hidden-input)
     -0:09.5.0 intentions:highlight (input.hidden-input)
     -0:09.3.0 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-html-preview 0.2.2 
autocomplete-clang 0.11.3 
autocomplete-python 1.10.2 
busy-signal 1.4.3 
file-icons 2.1.11 
formatter 2.12.4 
formatter-clangformat 1.0.1 
git-control 0.9.0 
highlight-line 0.12.0 
highlight-selected 0.13.1 
intentions 1.1.5 
language-cmake 0.3.0 
linter 2.2.0 
linter-python-pep8 0.2.0 
linter-ui-default 1.6.8 
markdown-preview-plus 2.4.10 
minimap 4.29.6 
minimap-cursorline 0.2.0 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.0.2 
split-diff 1.5.1 
sync-settings 0.8.3 

@HenrYxZ
Copy link

HenrYxZ commented Sep 13, 2017

For me it happens with Split Right from the editor. Split Right in the tree view works fine

@bsussman
Copy link

It is a little silly but if I quit and start atom - there ya go the new pane is aliive and well.

For now I have disabled minimap. I like it but not when i cannot do multipane editing conveniently.

@dannyfritz
Copy link

dannyfritz commented Sep 13, 2017

Can this issue get locked by moderation? No new information is being shared. Use the reaction buttons to +1.

@mehcode
Copy link
Collaborator

mehcode commented Sep 14, 2017

I'm trying to reproduce this and I'm having trouble. I use minimap daily (with atom-beta, 1.21-0 as of now) and I've not seen this issue.

I've tried splitting left/right in various ways, from the tree view or from a tab.

I've tried using project manager and switching projects (sometimes that can corrupt state in weird ways) and doing this.

I'm afraid it's hard to help without a reliable reproduction.


Regardless.. from pure guesswork, we appear to have a data race going on, though it doesn't appear to be a problem with minimap. The problem appears to be that sometimes getFirstVisibleScreenRow returns NaN. This is not a documented API. I'm guessing it returns NaN when there isn't a visible screen row.

I filed #633 as an attempt to fix this. Can someone that gets this issue use that branch locally and let me know if it fixes the issue?

$ git clone https://github.com/atom-minimap/minimap
$ cd minimap
$ git checkout mehcode-possible-fix-626
$ npm i
$ apm link .

@bsussman
Copy link

I keep the latest general and the latest beta available. Usually I run the beta if I can tell the difference ( :) )

1.19.7 and 1.20beta7 both reliably exhibited this issue.
1.20.0 and 1.21.0b0 do not.
So in my case the race is altered.

Race Conditions can be frustrating to find. Un-documented APIs and fun when they work and nasty when they don't. I try to never use them.

@maewolfsky
Copy link

I have had this issue occur in 1.20.0

@bsussman
Copy link

Shows how hard this can be :(

@sbrl
Copy link

sbrl commented Sep 15, 2017

Got another report for you. Link: https://hastebin.com/xumetegore.md

It's consistently occurring in atom 1.20.0 whenever I press backspace or enter near /**.

@mehcode
Copy link
Collaborator

mehcode commented Sep 15, 2017

@sbrl Could you please try using the version of minimap from the PR I linked: #633 ?

@sbrl
Copy link

sbrl commented Sep 15, 2017

@mehcode Sure! I don't know how to install that version though.

@mehcode
Copy link
Collaborator

mehcode commented Sep 15, 2017

Read the comment above for instructions: #626 (comment)

You'll need to uninstall your current version first.

@sbrl
Copy link

sbrl commented Sep 15, 2017

@mark-hahn Thanks! Didn't see that :P Got an error though on the apm link . command though:

Linking /home/sbrl/.atom/packages/minimap to /tmp/minimap failed: EEXIST: file already exists, symlink '/tmp/minimap' -> '/home/sbrl/.atom/packages/minimap'

@mehcode
Copy link
Collaborator

mehcode commented Sep 15, 2017

@sbrl Didn't edit my post fast enough. 🙂 You'll need to have your version uninstalled first. Either from the UI or:

apm uninstall minimap

@jkamenik
Copy link

jkamenik commented Sep 18, 2017

I tried to install minimap as detailed above but I get the following error.

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v6.7.0
npm ERR! npm  v3.10.7
npm ERR! path /Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jkamenik/github/minimap/npm-debug.log

Here is the log file

50342 error Darwin 15.6.0
50343 error argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "i"
50344 error node v6.7.0
50345 error npm  v3.10.7
50346 error path /Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js
50347 error code ENOENT
50348 error errno -2
50349 error syscall chmod
50350 error enoent ENOENT: no such file or directory, chmod '/Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js'
50351 error enoent ENOENT: no such file or directory, chmod '/Users/jkamenik/github/minimap/node_modules/js-beautify/js/bin/css-beautify.js'
50351 error enoent This is most likely not a problem with npm itself
50351 error enoent and is related to npm not being able to find a file.
50352 verbose exit [ -2, true ]

I am able to reproduce the issue on command by doing the following:

  1. Open an new empty file
    1. Don't save the file or issue less likely to happen
  2. Paste either a very long line with soft wrap enabled, or several pages of text
  3. Right click tab and Split left/right
  4. Error is presented
  5. Click anywhere on the document, Error is presented again
  6. Double Click (Highlight) anywhere on document, Error is presented again

Minimap has to be active at the time of the split.

At this point the only way to recover is to restart Atom.

If there is an easy fix to the NPM issue then I should be able to verify the fix is working. Just not sure the correct fix.

Running Atom 1.20.0 x64 on Mac.

Built-in Atom Packages (91)
├── atom-dark-syntax@0.28.0
├── atom-dark-ui@0.53.0
├── atom-light-syntax@0.29.0
├── atom-light-ui@0.46.0
├── base16-tomorrow-dark-theme@1.5.0
├── base16-tomorrow-light-theme@1.5.0
├── one-dark-ui@1.10.6
├── one-light-ui@1.10.6
├── one-dark-syntax@1.8.0
├── one-light-syntax@1.8.0
├── solarized-dark-syntax@1.1.2
├── solarized-light-syntax@1.1.2
├── about@1.7.6
├── archive-view@0.63.3
├── autocomplete-atom-api@0.10.2
├── autocomplete-css@0.17.2
├── autocomplete-html@0.8.0
├── autocomplete-plus@2.35.7
├── autocomplete-snippets@1.11.0
├── autoflow@0.29.0
├── autosave@0.24.3
├── background-tips@0.27.1
├── bookmarks@0.44.4
├── bracket-matcher@0.87.3
├── command-palette@0.40.4
├── dalek@0.2.1
├── deprecation-cop@0.56.7
├── dev-live-reload@0.47.1
├── encoding-selector@0.23.4
├── exception-reporting@0.41.4
├── find-and-replace@0.209.5
├── fuzzy-finder@1.5.8
├── github@0.4.0
├── git-diff@1.3.6
├── go-to-line@0.32.1
├── grammar-selector@0.49.5
├── image-view@0.62.3
├── incompatible-packages@0.27.3
├── keybinding-resolver@0.38.0
├── line-ending-selector@0.7.3
├── link@0.31.3
├── markdown-preview@0.159.13
├── metrics@1.2.6
├── notifications@0.69.0
├── open-on-github@1.2.1
├── package-generator@1.1.1
├── settings-view@0.251.5
├── snippets@1.1.4
├── spell-check@0.72.1
├── status-bar@1.8.11
├── styleguide@0.49.6
├── symbols-view@0.117.0
├── tabs@0.107.1
├── timecop@0.36.0
├── tree-view@0.217.7
├── update-package-dependencies@0.12.0
├── welcome@0.36.5
├── whitespace@0.37.2 (disabled)
├── wrap-guide@0.40.2
├── language-c@0.58.1
├── language-clojure@0.22.4
├── language-coffee-script@0.48.9
├── language-csharp@0.14.2
├── language-css@0.42.4
├── language-gfm@0.90.0
├── language-git@0.19.1
├── language-go@0.44.2
├── language-html@0.47.3
├── language-hyperlink@0.16.2
├── language-java@0.27.2
├── language-javascript@0.127.1
├── language-json@0.19.1
├── language-less@0.33.0
├── language-make@0.22.3
├── language-mustache@0.14.1
├── language-objective-c@0.15.1
├── language-perl@0.37.0
├── language-php@0.41.0
├── language-property-list@0.9.1
├── language-python@0.45.4
├── language-ruby@0.71.3
├── language-ruby-on-rails@0.25.2
├── language-sass@0.61.0
├── language-shellscript@0.25.2
├── language-source@0.9.0
├── language-sql@0.25.8
├── language-text@0.7.3
├── language-todo@0.29.2
├── language-toml@0.18.1
├── language-xml@0.35.2
└── language-yaml@0.30.1

Community Packages (35) /Users/jkamenik/.atom/packages
├── atom-fuzzy-grep@0.16.0
├── busy-signal@1.4.3
├── column-select@0.2.0
├── editorconfig@2.2.2
├── git-control@0.9.0
├── go-debug@1.5.2
├── go-plus@5.5.5
├── go-signature-statusbar@1.2.3
├── graphviz-preview-plus@1.4.4
├── highlight-selected@0.13.1
├── hyperclick@0.1.5
├── intentions@1.1.5
├── language-docker@1.1.8
├── language-dot@1.7.0
├── language-dotfiles@1.1.0
├── language-groovy@0.7.0
├── language-lua@0.9.11
├── language-puppet@0.23.0
├── language-scala@1.1.9
├── linter@2.2.0
├── linter-js-yaml@1.2.7
├── linter-ui-default@1.6.10
├── markdown-folding@0.1.0
├── markdown-pdf@2.1.0
├── minimap@4.29.6
├── minimap-bookmarks@0.4.2
├── minimap-cursorline@0.2.0
├── minimap-highlight-selected@4.6.1
├── minimap-linter@2.0.2
├── nvatom@0.11.0
├── pretty-json@1.6.4
├── tablr@1.8.3
├── tabularize@0.2.5
├── term3@0.22.1
└── theme-switcher@1.1.0

@etheranl
Copy link

@mehcode mehcode-possible-fix-626 work for me,thx!
btw,I'm using 1.21.0-beta0 on mac

@mehcode
Copy link
Collaborator

mehcode commented Sep 18, 2017

@HaoranW Thank you for confirming that

@mehcode
Copy link
Collaborator

mehcode commented Sep 18, 2017

Released v4.29.7 with the fix. Let us know if this is still an issue.

@scholtzm
Copy link

The fix seems to be solid on my end. 👍

@sbrl
Copy link

sbrl commented Sep 20, 2017

Sorry I haven't had time to check into this! Yeah, that fix does the job for me too 😺

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

Successfully merging a pull request may close this issue.