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: (565, NaN) #1062

Closed nandak522 closed 8 years ago

nandak522 commented 8 years ago

[Steps to reproduce below:]

  1. Opened Atom Editor v1.4.0. Got this error.
  2. Upgraded to the latest v1.4.2, got the same error.

Atom Version: 1.4.2 System: Ubuntu 14.04.3 Thrown From: linter package, v1.11.3

Stack Trace

Uncaught TypeError: Invalid Point: (565, NaN)

At /usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/point.js:63

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

Commands

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "grammar-selector",
      "language-c",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-java",
      "language-less",
      "language-make",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-ruby-on-rails",
      "language-sass",
      "language-toml",
      "language-yaml",
      "metrics",
      "archive-view",
      "background-tips",
      "bookmarks",
      "dev-live-reload",
      "encoding-selector",
      "image-view",
      "language-property-list",
      "link",
      "open-on-github",
      "package-generator",
      "spell-check",
      "autocomplete-atom-api",
      "deprecation-cop",
      "exception-reporting",
      "language-go",
      "language-hyperlink",
      "language-source",
      "styleguide",
      "welcome",
      "autosave",
      "keybinding-resolver"
    ],
    "excludeVcsIgnoredPaths": false,
    "ignoredNames": [
      "*.pyc",
      ".git",
      "*egg*",
      "usr"
    ],
    "packagesWithKeymapsDisabled": [
      "linter"
    ]
  },
  "linter": {
    "showErrorPanel": false,
    "showErrorTabFile": false,
    "showErrorTabProject": false,
    "statusIconScope": "File"
  }
}

Installed Packages

# User
angularjs, v0.3.4
atom-ternjs, v0.13.2
autocomplete-python, v1.5.2
color-picker, v2.1.1
editorconfig, v1.2.4
language-ini, v1.14.0
linter, v1.11.3
linter-jshint, v1.3.0
linter-pylama, v0.2.6
pigments, v0.22.1
project-manager, v2.7.5
set-syntax, v0.3.0

# Dev
No dev packages
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.

nandak522 commented 8 years ago

Ok. Let me install linter-eslint and give it a shot. Thanks :+1:

On Thu, 4 Feb 2016 at 01:01 Landon Abney notifications@github.com wrote:

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.

— Reply to this email directly or view it on GitHub https://github.com/atom-community/linter/issues/1062#issuecomment-179417417 .

nandak522 commented 8 years ago

Switched to eslint and couldn't be more happier :+1: