steelbrain / linter

A Base Linter with Cow Powers http://steelbrain.me/linter/
MIT License
1.1k stars 178 forks source link

Uncaught TypeError: Invalid Point: (19, NaN) #1064

Closed lpommers closed 8 years ago

lpommers commented 8 years ago

[Enter steps to reproduce below:]

  1. opened js file
  2. ...

Atom Version: 1.4.3 System: Mac OS X 10.11.3 Thrown From: linter package, v1.11.3

Stack Trace

Uncaught TypeError: Invalid Point: (19, NaN)

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/point.js:63

TypeError: Invalid Point: (19, NaN)
    at Function.module.exports.Point.assertValid (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/point.js:63:15)
    at TextBuffer.module.exports.TextBuffer.clipPosition (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1015:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1003:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:204:46)
    at TextEditorMarkerLayer.module.exports.TextEditorMarkerLayer.markBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-marker-layer.js:78:52)
    at DisplayBuffer.module.exports.DisplayBuffer.markBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1100:38)
    at TextEditor.module.exports.TextEditor.markBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1339:59)
    at /Users/lfp/.atom/packages/linter/lib/editor-linter.js:50:34
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at EditorLinter.addMessage (/Users/lfp/.atom/packages/linter/lib/editor-linter.js:137:20)
    at /Users/lfp/.atom/packages/linter/lib/linter-views.js:104:22
    at Array.forEach (native)
    at LinterViews.notifyEditorLinters (/Users/lfp/.atom/packages/linter/lib/linter-views.js:102:11)
    at LinterViews.render (/Users/lfp/.atom/packages/linter/lib/linter-views.js:59:10)
    at /Users/lfp/.atom/packages/linter/lib/linter.coffee:39:14
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at MessageRegistry.updatePublic (/Users/lfp/.atom/packages/linter/lib/message-registry.js:84:18)
    at UpdateMessages (/Users/lfp/.atom/packages/linter/lib/message-registry.js:24:16)

Commands

     -0:09.2.0 project-find:show (atom-pane.pane.active)
     -0:07.2.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:06.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "file-type-icons",
      "language-javascript-jsx"
    ],
    "packagesWithKeymapsDisabled": [
      "toggle-quotes"
    ]
  },
  "linter": {}
}

Installed Packages

# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
angularjs, v0.3.4
atom-jade, v0.3.0
atom-yeoman, v0.3.15
autoclose-html, v0.20.0
docblockr, v0.7.3
emmet, v2.4.1
file-icons, v1.6.14
highlight-selected, v0.11.2
json-schema, v0.1.15
language-cshtml, v0.1.1
linter, v1.11.3
linter-coffeelint, v1.1.2
linter-jscs, v3.4.1
linter-jshint, v1.3.0
minimap, v4.19.0
package-sync, v1.0.0
project-manager, v2.7.6
react, v0.14.1
save-session, v0.16.0
tabs-to-spaces, v1.0.1

# Dev
bracket-matcher, v0.76.0
steelbrain commented 8 years ago

cc @Arcanemagus

Arcanemagus commented 8 years ago

This is almost certainly a bug in the esprima parser used by jshint. If you want us to verify that you'll need to send the file you were seeing this on somewhere we can access it, but it's unlikely this is necessary.

You might want to look into moving to a linter that supports alternative parsers like eslint or jscs.

steelbrain commented 8 years ago

Dupe of #1048 #1053 #1058 #1059 #1061 #1062 #1065 #1068 #1060 #1063