atom-elastic-tabstops icon indicating copy to clipboard operation
atom-elastic-tabstops copied to clipboard

Uncaught TypeError: Cannot read property 'tags' of undefined

Open BrendonW opened this issue 4 years ago • 5 comments

[Enter steps to reproduce:]

  1. I created a new file and added the following two lines:
EventMatch: 
Trigger:
  1. Pressing "Up Arrow" with the cursor on the top line of the file is triggering the exception every time.

Atom: 1.40.1 x64 Electron: 3.1.10 OS: Mac OS X 10.14.6 Thrown From: elastic-tabstops package 1.3.1

Stack Trace

Uncaught TypeError: Cannot read property 'tags' of undefined

At /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11

TypeError: Cannot read property 'tags' of undefined
    at TextMateHighlightIterator.seek (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:560623)
    at ScreenLineBuilder.buildScreenLines (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1194447)
    at DisplayLayer.getScreenLines (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:95252)
    at DisplayLayer.getScreenLine (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:95149)
    at TextEditor.screenLineForScreenRow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:13891)
    at TextEditorComponent.requestHorizontalMeasurement (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:105144)
    at TextEditorComponent.pixelPositionForScreenPosition (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:66623)
    at moveCursorRows (/packages/elastic-tabstops/lib/elastic-tabstops.js:77:32)
    at /packages/elastic-tabstops/lib/elastic-tabstops.js:128:30
    at Array.forEach (<anonymous>)
    at transact (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:33144)
    at TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:492111)
    at TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:24215)
    at TextEditor.moveCursors (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:33112)
    at TextEditor.editor._altMoveUp (/packages/elastic-tabstops/lib/elastic-tabstops.js:128:8)
    at TextEditor.editor.moveUp (/packages/elastic-tabstops/lib/elastic-tabstops.js:135:22)
    at TextEditor.core:move-up (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:302716)
    at HTMLElement.n.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:306771)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349123)
    at KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1249835)
    at KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1245969)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:284329)

Commands

 10x -1:48.5.0 core:move-left (input.hidden-input)
     -1:47.2.0 editor:newline (input.hidden-input)
     -1:46.7.0 core:move-up (input.hidden-input)
  3x -1:44.2.0 core:backspace (input.hidden-input)
  2x -1:35.2.0 core:move-up (input.hidden-input)
     -0:08.5.0 core:move-down (input.hidden-input)
  2x -0:08.1.0 core:move-up (input.hidden-input)

Non-Core Packages

atom-ide-ui 0.13.0 
busy-signal 2.0.1 
elastic-tabstops 1.3.1 
file-icons 2.1.35 
go-debug 1.6.2 
go-plus 6.1.0 
go-rename 0.3.0 
go-signature-statusbar 1.2.3 
Hydrogen 2.12.0 
intentions 1.1.5 
language-docker 1.1.8 
language-haml 0.32.1 
language-protobuf 0.7.1 
linter 2.3.1 
linter-jsonlint 1.4.0 
linter-ui-default 1.8.0 
minimap 4.29.9 
platformio-ide-terminal 2.9.4 
pretty-json 2.1.2 
teletype 0.13.4 

BrendonW avatar Sep 19 '19 16:09 BrendonW

I wonder if this is related to my file having a .bw extension?

BrendonW avatar Sep 19 '19 17:09 BrendonW

Also occurs for .lua, so I doubt it is dependent on the extension.

mrudat avatar Dec 24 '19 10:12 mrudat

Getting this with regular .js files as well, so seems to be happening independently of extension.

AndreasPizsa avatar Mar 01 '20 10:03 AndreasPizsa

It also happened to me typing in a "untitled" edit window - before I had a chance to save the file even.

graemeg avatar Mar 20 '20 13:03 graemeg

Unfortunately I do not have much time on this package now, if anyone could commit PR to fix this I would like to merge it asap.

hax avatar Mar 21 '20 03:03 hax