I can't use backspace button sometimes


#1

[Enter steps to reproduce:]

Atom: 1.25.1 x64
Electron: 1.7.11
OS: Windows 10 64x
Thrown From: Atom Core

Stack Trace

Uncaught TypeError: Cannot read property ‘0’ of null

At C:\Users\lg\AppData\Local\atom\app-1.25.1\resources\app\node_modules\text-buffer\lib\text-buffer.js:959

TypeError: Cannot read property '0' of null
    at ~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/bracket-matcher/lib/tag-finder.js:168:36
    at TextBuffer.module.exports.TextBuffer.scanInRange (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/text-buffer.js:1097:15)
    at TextBuffer.module.exports.TextBuffer.backwardsScanInRange (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/text-buffer.js:1115:25)
    at TextEditor.backwardsScanInBufferRange (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:3392:82)
    at TagFinder.module.exports.TagFinder.findStartEndTags (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/bracket-matcher/lib/tag-finder.js:163:25)
    at TagFinder.module.exports.TagFinder.findMatchingTags (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/bracket-matcher/lib/tag-finder.js:208:27)
    at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js:135:41)
    at ~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/bracket-matcher/lib/bracket-matcher-view.js:3:65
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at TextEditor.selectionRangeChanged (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:3323:24)
    at Selection.markerDidChange (~/AppData/Local/atom/app-1.25.1/resources/app/src/selection.js:937:23)
    at Selection.marker.onDidChange.e (~/AppData/Local/atom/app-1.25.1/resources/app/src/selection.js:21:45)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at DisplayMarker.module.exports.DisplayMarker.notifyObservers (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/display-marker.js:248:33)
    at ~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/display-marker.js:53:32
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at Marker.module.exports.Marker.emitChangeEvent (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/marker.js:441:26)
    at Marker.module.exports.Marker.update (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/marker.js:374:18)
    at Marker.module.exports.Marker.clearTail (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/marker.js:196:25)
    at DisplayMarker.module.exports.DisplayMarker.clearTail (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/display-marker.js:198:38)
    at Selection.clear (~/AppData/Local/atom/app-1.25.1/resources/app/src/selection.js:199:50)
    at Cursor.clearSelection (~/AppData/Local/atom/app-1.25.1/resources/app/src/cursor.js:655:46)
    at Cursor.changePosition (~/AppData/Local/atom/app-1.25.1/resources/app/src/cursor.js:712:16)
    at Cursor.setBufferPosition (~/AppData/Local/atom/app-1.25.1/resources/app/src/cursor.js:85:16)
    at Selection.deleteSelectedText (~/AppData/Local/atom/app-1.25.1/resources/app/src/selection.js:581:40)
    at Selection.backspace (~/AppData/Local/atom/app-1.25.1/resources/app/src/selection.js:497:16)
    at mutateSelectedText.selection (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1373:65)
    at getSelectionsOrderedByBufferPosition.map (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1387:92)
    at Array.map (native)
    at transact (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1387:66)
    at TextBuffer.module.exports.TextBuffer.transact (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/text-buffer/lib/text-buffer.js:952:24)
    at TextEditor.transact (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1839:30)
    at mergeIntersectingSelections (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1386:25)
    at TextEditor.mergeSelections (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:3252:26)
    at TextEditor.mergeIntersectingSelections (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:3223:42)
    at TextEditor.mutateSelectedText (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1385:23)
    at TextEditor.backspace (~/AppData/Local/atom/app-1.25.1/resources/app/src/text-editor.js:1373:23)
    at TextEditor.object.(anonymous function) [as backspace] (~/AppData/Local/atom/app-1.25.1/resources/app/node_modules/underscore-plus/lib/underscore-plus.js:77:33)
    at TextEditor.core:backspace (~/AppData/Local/atom/app-1.25.1/resources/app/src/register-default-commands.js:442:27)

Commands

     -0:24.9.0 core:backspace (input.hidden-input)
     -0:24.4.0 autoclose-html:close-and-complete (input.hidden-input)
  4x -0:23.2.0 core:select-right (input.hidden-input)
     -0:22.4.0 intentions:highlight (input.hidden-input)
  3x -0:22.3.0 find-and-replace:select-next (input.hidden-input)
     -0:21.5.0 core:move-left (input.hidden-input)
     -0:20.9.0 editor:newline (input.hidden-input)
     -0:20.6.0 core:move-down (input.hidden-input)
     -0:20.2.0 intentions:highlight (input.hidden-input)
     -0:20.1.0 editor:move-line-up (input.hidden-input)
     -0:19.8.0 intentions:highlight (input.hidden-input)
     -0:19.8.0 core:save (input.hidden-input)
     -0:18.5.0 intentions:highlight (input.hidden-input)
  3x -0:18.4.0 core:cut (input.hidden-input)
     -0:17.9.0 intentions:highlight (input.hidden-input)
     -0:17.8.0 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.0 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
atom-ternjs 0.18.3 
autoclose-html 0.23.0 
autocomplete 0.47.0 
browser-plus 0.0.98 
color-picker 2.2.5 
file-icons 2.1.17 
highlight-selected 0.13.1 
intentions 1.1.5 
intentions-colorpicker 1.0.1 
minimap 4.29.8 
remote-ftp 2.1.4 

#2

Does it happen in safe mode? Try with atom --safe


#3

To me, it looks like an error with bracket-matcher, which is a core package and won’t be disabled by safe mode. An additional test should be performed to see if the error appears when only bracket-matcher is disabled.


#4

Based on the stack trace, I think this is:

This was fixed and the fix will be available in a future release.