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 'tokenAtBufferColumn' of undefined #110
Copy link
Copy link
Closed
atom/text-buffer
#53Description
[Enter steps to reproduce below:]
- ...
- ...
Atom Version: 0.165.0
System: Mac OS X 10.10.2
Thrown From: bracket-matcher package, v0.64.0
Stack Trace
Uncaught TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
At /Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:499
TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
at TokenizedBuffer.module.exports.TokenizedBuffer.tokenForPosition (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:499:38)
at TokenizedBuffer.module.exports.TokenizedBuffer.scopeDescriptorForPosition (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:492:22)
at DisplayBuffer.module.exports.DisplayBuffer.scopeDescriptorForBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1026:35)
at TextEditor.module.exports.TextEditor.scopeDescriptorForBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2374:33)
at Cursor.module.exports.Cursor.getScopeDescriptor (/Applications/Atom.app/Contents/Resources/app/src/cursor.js:225:26)
at TagFinder.module.exports.TagFinder.isCursorOnTag (/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/tag-finder.js:39:67)
at TagFinder.module.exports.TagFinder.findMatchingTags (/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/tag-finder.js:140:16)
at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (/Applications/Atom.app/Contents/Resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js:128:35)
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:207: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:302:20)
at DisplayBuffer.module.exports.DisplayBuffer.handleBufferMarkersUpdated (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1570: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/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:595: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.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:84:24)
at TextBuffer.module.exports.TextBuffer.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:675:27)
at TextEditor.module.exports.TextEditor.undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1137:26)
at TextEditor.atom.commands.add.stopEventPropagation.core:undo (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:304:19)
at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:272:32)
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:549:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)
Commands
16x -0:00.0 core:undo (input.hidden-input)
Config
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
],
"excludeVcsIgnoredPaths": false
}
}
Installed Packages
# User
html2haml, v0.3.0
language-haml, v0.10.0
monokai, v0.8.0
toggle-quotes, v0.7.0
# Dev
No dev packages/cc @atom/core
Activity
winstliu commentedon Feb 25, 2015
Please upgrade Atom to the latest version (currently 0.182.0) and see if you can reproduce this.
izuzak commentedon Feb 28, 2015
@nathansobo I was able to reproduce this in the latest master version
0.185.0-115f519.Steps to reproduce:
Type this text into the editor from top to bottom (don't copy paste it):
Select all (
cmd-a).Split selection into lines (
cmd-shift-l)Move all cursors right (press right arrow once)
Move all cursors left (press left arrow once)
Undo (
cmd-z) a few times.Atom Version: 0.185.0-115f519
System: Mac OS X 10.10.2
Thrown From: bracket-matcher package, v0.71.0
Stack Trace
Uncaught TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
Commands
Config
{ "core": { "disabledPackages": [ "relative-numbers", "emmet", "git-tab-status", "jsformat", "deprecation-cop" ], "audioBeep": false, "excludeVcsIgnoredPaths": false }, "bracket-matcher": { "wrapSelectionsInBrackets": false } }Installed Packages
MiquelAdell commentedon Mar 9, 2015
I've also been able to reproduce it with very similar steps.
I was writing, using the line selection [cmd + hold click + drag], then writing a little more an undoing.
Atom Version: 0.186.0
System: Mac OS X 10.10.1
Thrown From: bracket-matcher package, v0.71.0
Stack Trace
Uncaught TypeError: Cannot read property 'tokenAtBufferColumn' of undefined
Commands
Config
{ "core": { "ignoredNames": [ ".git", ".svn", ".DS_Store" ], "disabledPackages": [ "wrap-guide", "whitespace", "preview-tabs", "term2", "atom-ctags" ], "projectHome": "/Users/miquel/code", "excludeVcsIgnoredPaths": false } }Installed Packages
aendra-rininsland commentedon Mar 10, 2015
I get this every time I try to do the cmd+/ shortcut to comment a line when it's inline JavaScript (i.e., inside a Polymer element). It is the single most frustrating aspect of Atom at the moment...
Stack trace:
nathansobo commentedon Mar 20, 2015
There were some test failures with the text-buffer upgrade, so reopening this one.
nathansobo commentedon Mar 20, 2015
Closed via atom/text-buffer@d54de8c
nathansobo commentedon Mar 20, 2015
@izuzak Are there any other issues that might be related to this? I feel like I saw some but I can't track them down now.
izuzak commentedon Mar 20, 2015
@nathansobo I can't remember any, but I'm just going through issues from the last week and will let you know if I 🏃 into anything related.