This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Uncaught TypeError: Cannot read property 'isEmpty' of undefined #102
Copy link
Copy link
Closed
Labels
Description
On a .less file, over a samba share:
- Used a snippet
- Cut last line of generated text
- Select whole file until line before end
- Press TAB
Atom Version: 0.176.0
System: Mac OS X 10.10.1
Thrown From: bracket-matcher package, v0.69.0
Stack Trace
Uncaught TypeError: Cannot read property 'isEmpty' of undefined
At /Applications/Atom.app/Contents/Resources/app/src/workspace.js:710
TypeError: Cannot read property 'isEmpty' of undefined
at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js:108:42)
at /Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js:40:24
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:210:32
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at DisplayBuffer.module.exports.DisplayBuffer.emitDidChange (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:320:20)
at DisplayBuffer.module.exports.DisplayBuffer.handleBufferMarkersUpdated (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1588:21)
at /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:5:61
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 TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:599:20)
at BufferPatch.module.exports.BufferPatch.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
at Transaction.module.exports.Transaction.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
at History.module.exports.History.abortTransaction (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:165:24)
at History.module.exports.History.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:122:16)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)
at /Applications/Atom.app/Contents/Resources/app/node_modules/whitespace/lib/whitespace.js:52:25
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 TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:965:20)
at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:620:26)
at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:538:16)
at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:522:19)
at Workspace.module.exports.Workspace.saveActivePaneItemAndReportErrors (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:689:44)
at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:679:19)
at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:295:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:170:20)
Commands
2x -0:21.6 editor:newline (atom-text-editor.editor.is-focused)
-0:21.1 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:21.0 snippets:expand (atom-text-editor.editor.is-focused)
-0:15.7 editor:move-to-beginning-of-word (input)
-0:15.1 core:move-left (atom-text-editor.editor.is-focused)
-0:14.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-0:13.3 core:move-up (atom-text-editor.editor.is-focused)
-0:12.7 core:cut (atom-text-editor.editor.is-focused)
-0:11.8 core:select-down (atom-text-editor.editor.is-focused)
-0:11.5 core:cut (atom-text-editor.editor.is-focused)
-0:11.1 core:move-up (atom-text-editor.editor.is-focused)
-0:10.4 core:move-down (atom-text-editor.editor.is-focused)
-0:10.0 core:select-to-bottom (atom-text-editor.editor.is-focused)
-0:09.4 core:select-up (atom-text-editor.editor.is-focused)
-0:08.8 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:01.4 core:save (atom-text-editor.editor.is-focused)
Config
{
"core": {
"disabledPackages": [
"remember-session",
"linter-jshint",
"merge-conflicts"
],
"themes": [
"atom-dark-ui",
"monokai"
]
}
}Installed Packages
# User
atom-color-highlight, v3.0.5
autoclose-html, v0.14.0
autocomplete-plus, v1.1.0
file-types, v0.3.0
highlight-line, v0.9.3
language-jade, v0.3.0
language-smarty-php, v0.4.0
linter, v0.10.1
linter-jscs, v1.4.9
monokai, v0.11.0
save-session, v0.11.3
# Dev
No dev packages/cc @atom/core
Activity
RodrigoEspinosa commentedon Mar 5, 2015
This is happening to me too in a javascript file.
Atom Version: 0.186.0
System: Mac OS X 10.10.2
Thrown From: bracket-matcher package, v0.71.0
Stack Trace
Uncaught TypeError: Cannot read property 'isEmpty' of undefined
Commands
Config
{ "core": { "followSymlinks": true, "disabledPackages": [ "atom-lint", "linter-pep8", "linter-pylint", "python-isort", "autocomplete", "timekeeper", "symbols-view", "vim-mode", "atom-spotify", "color-picker", "bower-install", "Tern", "atom-ctags", "atom-wield", "terminal-status", "autocomplete-jedi", "slack-chat", "web-view", "web-browser" ], "themes": [ "quantum-ui", "quantum-syntax" ], "projectHome": "/User/rec/Documents/Projects/rec", "excludeVcsIgnoredPaths": false, "audioBeep": false } }Installed Packages
tjmehta commentedon Apr 22, 2015
+1... This bug has been ongoing for over a week. Very annoying as I have just transitioned to atom.
Atom Version: 0.192.0
System: Mac OS X 10.10.1 (Yosemite)
Thrown From: bracket-matcher package, v0.73.0
REPRO STEPS:
The problems is intermittent, but it frequently repros when I try to split-pane right
(CMD+k right)
winstliu commentedon Apr 22, 2015
Is this reproducible in safe mode (
atom --safe)?tjmehta commentedon Apr 22, 2015
I am unfamiliar with
atom --safewill that still run withbracket-matcherenabled?winstliu commentedon Apr 22, 2015
Yes. It only disables community packages (eg ones that you installed manually from Settings-->Install).
irobayna commentedon May 4, 2015
@50Wliu this does not happen when running
atom --safewinstliu commentedon May 4, 2015
In that case, this isn't an Atom bug. You can try to use the package-cop by @mark-hahn to figure out which package is causing this error.
despairblue commentedon Jul 2, 2015
FWIW: happened just to me. No idea how to get atom into this state, but when it's in this state:
It happens when I try to open a new pane (
ctrl-k, right arrow):[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: "Arch Linux"
Thrown From: bracket-matcher package, v0.76.0
Stack Trace
Uncaught TypeError: Cannot read property 'isEmpty' of undefined
Commands
Config
{ "core": { "excludeVcsIgnoredPaths": false, "disabledPackages": [ "atom-color-highlight", "atom-pair", "atomatigit", "autocomplete", "autocomplete", "es-navigation", "filetype-color", "grunt-runner", "incremental-search", "linter-eslint", "linter-jshint", "linter-scspell", "markdown-scroll-sync", "metrics", "minimap-color-highlight", "minimap-find-and-replace", "minimap-git-diff", "minimap-highlight-selected", "minimap", "navigate", "package-cop", "starred-package-installer", "symbols-tree-view", "tab-smart-sort", "Tern", "test-status", "themed-settings", "travis-ci-status", "tree-view-breadcrumb", "tree-view-open-files", "welcome", "zentabs", "tree-view" ], "projectHome": "/home/despairblue/vcs/git/", "destroyEmptyPanes": false, "autoHideMenuBar": true } }Installed Packages
And when trying to join lines (
ctrl-j)or when typing, basically anything that would change the buffer
I hope the different stack traces help to pin down this issue.
despairblue commentedon Jul 2, 2015
btw closing the buffer and opening the same file again does not help. All other files work fine.
Reloading atom helps. I think this might have something to do with updating packages using apm while atom is running. Just a hunch.
budda commentedon Jul 19, 2015
Like @despairblue mentioned, I got the same error when opening a new view pane > split right.
tylerFowler commentedon Jul 20, 2015
Also seeing this when trying to split a new pane (both via shortcut & context menu) but only as of today.
3 remaining items
dos1 commentedon Jul 23, 2015
Well, made my comment straight from Atom's error dialog. Then I disabled the module (still failed), restarted (it worked), and then reenabled the module - and it still works.
nathansobo commentedon Jul 23, 2015
The last selection is somehow getting removed from the editor, and I'm not sure how it's happening. I've added an assertion to report when it happens to our error tracker, but there's some noise right now caused by a legitimate situation where the selection is removed and then restored when splitting selections into lines. These spurious reports will be eliminated in the next release so hopefully it will be easier to track when it's happening.
nathansobo commentedon Jul 23, 2015
It looks like a package called Sublime Style Column Selection is destroying the last selection in certain cases. Once we're sure none of our own packages do this, we should probably throw an error when this is attempted.
dos1 commentedon Jul 23, 2015
I don't have this package installed:
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
Atom 1.0.2 on GNU/Linux
tylerFowler commentedon Jul 23, 2015
Ok it seems like this is still randomly cropping up, reloading the window fixes the issue. I'll go ahead and work in Atom safe mode for a while and see if it still happens.
My packages:
System:
OSX Yosemite on Early 2015 MBP w/ Atom Version 1.0.2 (latest)
tylerFowler commentedon Jul 23, 2015
Update: didn't happen in safe mode, though after I switched back to the regular Atom I found another nasty version of this where I'd get this error whenever I try to save (and the file won't save!).
nathansobo commentedon Jul 24, 2015
Once I start throwing exceptions when removing the last selection we'll figure out when it's happening. It's also possible the bracket matcher is still attached to a destroyed editor (editors destroy all their selections when they are destroyed), but I don't know how that would happen.
eighteyes commentedon Jul 28, 2015
Hit Cmd-K then right arrow seems to reproduce this pretty consistently
$ apm list
Built-in Atom packages (88)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
/Users/god/.atom/packages (26)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
nathansobo commentedon Jul 28, 2015
@eighteyes Try uninstalling Sublime-style-column-selection as it's a known culprit here.
eighteyes commentedon Jul 28, 2015
ty :)
On Tue, Jul 28, 2015 at 12:29 PM, Nathan Sobo [email protected]
wrote:
drom commentedon Aug 5, 2015
[Enter steps to reproduce below:]
Atom Version: 1.0.3
System: "openSUSE 13.2
Thrown From: bracket-matcher package, v0.76.0
Stack Trace
Uncaught TypeError: Cannot read property 'isEmpty' of undefined
Commands
Config
{ "core": { "audioBeep": false, "themes": [ "atom-dark-ui", "atom-dark-syntax" ] } }Installed Packages
drom commentedon Aug 17, 2015
it is annoying 😞
Create a selection automatically as needed if the last one was destroyed