mrodalgaard / language-log

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

Uncaught TypeError: Cannot read property 'getLineCount' of null #42

Open tap52384 opened 6 years ago

tap52384 commented 6 years ago

[Enter steps to reproduce:]

  1. Write to the log
  2. Error pops up consistently

Atom: 1.24.0 x64 Electron: 1.6.16 OS: Mac OS X 10.13.3 Thrown From: language-log package 1.10.0

Stack Trace

Uncaught TypeError: Cannot read property 'getLineCount' of null

At /Users/patricklewis/.atom/packages/language-log/lib/log-view.coffee:205

TypeError: Cannot read property 'getLineCount' of null
    at LogView.module.exports.LogView.updateDescription (/packages/language-log/lib/log-view.coffee:205:24)
    at /packages/language-log/lib/log-view.coffee:131:8
    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 TextBuffer.module.exports.TextBuffer.emitDidStopChangingEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1724:26)
    at later (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/helpers.js:28:13)

Commands

     -3:38.3.0 core:save (input.hidden-input)
     -3:20.1.0 core:undo (input.hidden-input)
     -3:18 core:copy (input.hidden-input)
     -3:16.9.0 docblockr:parse-enter (input.hidden-input)
     -3:16.9.0 editor:newline (input.hidden-input)
     -3:16.7.0 core:paste (input.hidden-input)
     -3:13.4.0 core:save (input.hidden-input)
     -3:11 core:delete (input.hidden-input)
  9x -3:10.8.0 core:backspace (input.hidden-input)
     -3:04.7.0 core:save (input.hidden-input)
     -3:02.0 core:move-right (input.hidden-input)
     -3:01.2.0 docblockr:parse-enter (input.hidden-input)
     -3:01.2.0 editor:newline (input.hidden-input)
  2x -3:00.7.0 core:save (input.hidden-input)
  2x -1:34.5.0 core:backspace (input.hidden-input)
     -1:32 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.0 
busy-signal 1.4.3 
docblockr 0.13.7 
file-icons 2.1.17 
highlight-line 0.12.0 
intentions 1.1.5 
language-ansible 0.2.2 
language-blade 0.38.0 
language-docker 1.1.8 
language-env 0.2.0 
language-htaccess 0.2.0 
language-ldif 0.3.0 
language-log 1.10.0 
language-powershell 4.0.0 
language-swift 0.5.0 
language-vue 0.23.1 
linter 2.2.0 
linter-docker 0.3.0 
linter-eslint 8.4.1 
linter-markdown 5.2.0 
linter-php 1.5.1 
linter-phpcs 1.6.8 
linter-phpmd 2.0.0 
linter-sass-lint 1.8.3 
linter-swiftlint 1.2.2 
linter-ui-default 1.7.1 
linter-xmllint 1.4.3 
monokai 0.24.0 
pigments 0.40.2 
split-diff 1.5.2 
KyLeggiero commented 6 years ago

I'm still getting this error

mdasu commented 6 years ago

I likewise am getting the same error.

mrodalgaard commented 6 years ago

@BenLeggiero and @mdasu could you describe the situation that triggers this error. Also including example log file.

mdasu commented 6 years ago

Situation Details. Tailing .log file produced from MuleSoft's AnyPoint Studio as job is running. As I have Atom open and 'Tail on File Changes' ticked, when the Mule service runs and the log file is written to, I get a series of Uncaught TypeError: Cannot read property 'getLineCount' of null errors sample.log get_line_count

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.25.0 x64 Electron: 1.7.11 OS: Mac OS X 10.12.6 Thrown From: language-log package 1.10.1

Stack Trace

Uncaught TypeError: Cannot read property 'getLineCount' of null

At /Users/michaeldeiter/.atom/packages/language-log/lib/log-view.coffee:205

TypeError: Cannot read property 'getLineCount' of null
    at LogView.module.exports.LogView.updateDescription (/packages/language-log/lib/log-view.coffee:205:24)
    at /packages/language-log/lib/log-view.coffee:131:8
    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 TextBuffer.module.exports.TextBuffer.emitDidStopChangingEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1773:26)
    at later (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/helpers.js:28:13)

Commands

Non-Core Packages

api-workbench 0.8.48 
atom-beautify 0.32.2 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
autoclose-html 0.23.0 
ayu-mirage-ish-syntax 1.1.0 
busy-signal 1.4.3 
city-lights-syntax 1.1.8 
highlight-selected 0.13.1 
intentions 1.1.5 
language-groovy 0.7.0 
language-log 1.10.1 
linter 2.2.0 
linter-csslint 2.0.0 
linter-htmlhint 1.4.0 
linter-jslint 11.1.0 
linter-pylint 2.1.1 
linter-ui-default 1.7.1 
minimap 4.29.8 
minimap-highlight-selected 4.6.1 
monokai 0.24.0 
monokai-seti 0.9.0 
newton-syntax 1.0.1 
open-recent 5.0.0 
pigments 0.40.2 
project-manager 3.3.5 
raml 0.2.0 
seti-ui 1.10.0 
solarized-one-light-ui 1.10.10 
tail 0.1.0 
todo-show 2.2.0 
xml-formatter 0.11.0 
KyLeggiero commented 6 years ago

Still getting this error...

Atom: 1.26.0 x64 Electron: 1.7.11 OS: Mac OS X 10.12.6 Thrown From: language-log package 1.10.1

Stack Trace

Uncaught TypeError: Cannot read property 'getLineCount' of null

At /Users/bleggiero/.atom/packages/language-log/lib/log-view.coffee:205

TypeError: Cannot read property 'getLineCount' of null
    at LogView.module.exports.LogView.updateDescription (/packages/language-log/lib/log-view.coffee:205:24)
    at /packages/language-log/lib/log-view.coffee:131:8
    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 TextBuffer.module.exports.TextBuffer.emitDidStopChangingEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1773:26)
    at later (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/helpers.js:28:13)

Commands

     -3:17.6.0 core:close (input.hidden-input)
     -1:16.3.0 find-and-replace:show (input.hidden-input)
  2x -1:15.1.0 core:move-up (input.hidden-input)
     -1:13.6.0 core:confirm (input.hidden-input)
  5x -1:13.1.0 core:move-up (input.hidden-input)
     -1:03.7.0 editor:move-to-end-of-screen-line (input.hidden-input)
  3x -1:03.4.0 core:move-left (input.hidden-input)
     -1:02.5.0 core:move-right (input.hidden-input)
     -0:48.5.0 find-and-replace:focus-next (input.hidden-input)
  2x -0:48.1.0 core:backspace (input.hidden-input)
     -0:47.6.0 find-and-replace:focus-previous (input.hidden-input)
     -0:46.6.0 editor:delete-to-beginning-of-line (input.hidden-input)
     -0:46.2.0 core:move-down (input.hidden-input)
  3x -0:45.8.0 core:move-up (input.hidden-input)
     -0:43.7.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-html-preview 0.2.5 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.1.3 
atom-text-transformer 0.7.0 
autocomplete-swift 1.0.3 
busy-signal 1.4.3 
drag-drop-text 0.1.4 
hex-editor 0.1.1 
highlight-selected 0.13.1 
intentions 1.1.5 
language-applescript 0.3.0 
language-csv 1.1.2 
language-kotlin 0.5.0 
language-log 1.10.1 
language-markdown 0.25.1 
language-scala 1.1.9 
language-swift 0.5.0 
lint 0.0.1 
linter 2.2.0 
linter-kotlin 0.6.0 
linter-ui-default 1.7.1 
man 0.8.2 
markdown-preview-plus 2.5.7 
markdown-scroll-sync 2.1.2 
markdown-writer 2.7.3 
minimap 4.29.8 
minimap-highlight-selected 4.6.1 
sequential-number 0.5.0 
sort-lines 0.18.0 
split-diff 1.5.2 
Sublime-Style-Column-Selection 1.7.4 
tab-numbers 0.6.1 
transform 0.4.0 
ghost commented 6 years ago

i have same error any idea how fix it?

llqgit commented 6 years ago

I just change the source code like this (in windows): .atom\packages\language-log\lib\log-view.coffee

  updateDescription: ->
    return unless @textEditor  # the code I've added

I hope this would help you guys.

ghost commented 6 years ago

Yes! That works. Thank you so much! I'm going testing this on Ubuntu soon.

spaciousmind commented 4 years ago

yep. seems to have worked for me, thanks for the tip llqgit. my issue started when I installed the delete-whitelines plugin..... there must be a conflict there