mrodalgaard / language-log

Log file syntax highlighting in Atom
MIT License
42 stars 9 forks source link

Uncaught TypeError: Cannot match against 'undefined' or 'null'. #43

Closed fliebe92 closed 6 years ago

fliebe92 commented 6 years ago

[Enter steps to reproduce:]

  1. Just open a *.log file in atom. Remark: File is empty.
  2. Error is displayed.

Atom: 1.25.0-beta3 x64 Electron: 1.7.11 OS: Mac OS X 10.13.3 Thrown From: language-log package 1.10.0

Stack Trace

Uncaught TypeError: Cannot match against 'undefined' or 'null'.

At /Applications/Atom.app/Contents/Resources/app/src/text-mate-language-mode.js:542

TypeError: Cannot match against 'undefined' or 'null'.
    at TextMateLanguageMode.bufferRangeForScopeAtPosition (/Applications/Atom.app/Contents/Resources/app/src/text-mate-language-mode.js:542:43)
    at TextEditor.bufferRangeForScopeAtPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:3684:48)
    at LogFilter.module.exports.LogFilter.getLineTimestamp (/packages/language-log/lib/log-filter.coffee:204:27)
    at LogFilter.module.exports.LogFilter.getLastTimestamp (/packages/language-log/lib/log-filter.coffee:197:23)
    at LogView.module.exports.LogView.updateTimestamps (/packages/language-log/lib/log-view.coffee:222:31)
    at /packages/language-log/lib/log-view.coffee:137:10
    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 TextEditor.languageModeSubscription.languageMode.onDidTokenize.languageMode.onDidTokenize (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:197:26)
    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 TextMateLanguageMode.markTokenizationComplete (/Applications/Atom.app/Contents/Resources/app/src/text-mate-language-mode.js:324:26)
    at TextMateLanguageMode.tokenizeNextChunk (/Applications/Atom.app/Contents/Resources/app/src/text-mate-language-mode.js:318:18)
    at _.defer (/Applications/Atom.app/Contents/Resources/app/src/text-mate-language-mode.js:279:63)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/underscore/underscore.js:666:53

Commands

     -1:10.4.0 core:move-down (input.hidden-input)
  2x -1:10 core:backspace (input.hidden-input)
     -1:09.1.0 core:save (input.hidden-input)
     -0:21.3.0 core:copy (input.hidden-input)
  3x -0:20.8.0 core:move-down (input.hidden-input)
  2x -0:18.8.0 editor:newline (input.hidden-input)
     -0:18.3.0 core:move-up (input.hidden-input)
     -0:18 snippets:next-tab-stop (input.hidden-input)
     -0:18 snippets:expand (input.hidden-input)
     -0:18 editor:indent (input.hidden-input)
     -0:16.2.0 autocomplete-plus:confirm (input.hidden-input)
     -0:16.2.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:15.8.0 core:paste (input.hidden-input)
     -0:15.5.0 editor:consolidate-selections (input.hidden-input)
  3x -0:15.3.0 core:move-right (input.hidden-input)
     -0:13.3.0 core:save (input.hidden-input)

Non-Core Packages

atom-alignment 0.13.0 
atom-bracket-highlight 0.3.2 
atom-clock 0.1.16 
atom-dark-monokai-syntax 0.18.0 
atom-material-ui 2.1.3 
ctags-status 1.3.7 
dqs-shell-commands 2.2.3 
emmet 2.4.3 
file-icons 2.1.17 
filesize 4.0.0 
flex-tool-bar 1.1.0 
fonts 3.0.3 
git-blame 1.6.0 
git-control 0.9.0 
git-history 3.3.0 
git-log 0.4.1 
git-plus 7.10.0 
git-time-machine 1.5.9 
goto-definition 1.3.4 
highlight-line 0.12.0 
highlight-selected 0.13.1 
hyperclick 0.1.5 
keyboard-scroll 0.7.0 
language-generic-config 1.4.0 
language-log 1.10.0 
language-perl-template-toolkit 0.1.0 
less-than-slash 0.18.0 
merge-conflicts 1.4.5 
minimap 4.29.8 
minimap-autohider 1.5.4 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-split-diff 0.3.7 
monokai 0.24.0 
open-files 0.8.2 
open-terminal-here 2.3.1 
pdf-view 0.65.0 
process-palette 0.16.1 
project-manager 3.3.5 
snow-dark-syntax 0.1.1 
split-diff 1.5.2 
status-bar-blame 2.0.2 
symbols-list 2.4.1 
tab-numbers 0.6.1 
term3 0.22.1 
todo-show 2.2.0 
tool-bar 1.1.6 
tree-view-autoresize 2.3.0 
tree-view-git-status 1.4.0 
fliebe92 commented 6 years ago

@mrodalgaard, JFYI: Seems that there is no @textEditor.bufferRangeForScopeAtPosition() anymore in Atom 1.25.0-beta3 x64

Update: It seems to be missing in the docs, sorry for confusing.