AtomLinter / linter-flake8

Linting Python files on the fly using flake8 with Atom
MIT License
103 stars 45 forks source link

Linter fails at start on atom git: Uncaught TypeError: Invalid Point: (1, NaN) #196

Closed paradoxxxzero closed 8 years ago

paradoxxxzero commented 8 years ago

Atom Version: 1.9.0-dev-38ff433 System: linux 4.5.3-1-ARCH Thrown From: linter package, v1.11.4

Stack Trace

Uncaught TypeError: Invalid Point: (1, NaN)

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

TypeError: Invalid Point: (1, 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:1080:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1068:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:192:46)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.markBufferRange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/display-marker-layer.js:74:62)
    at TextEditor.module.exports.TextEditor.markBufferRange (/usr/share/atom/resources/app.asar/src/text-editor.js:1571:38)
    at /home/zero/.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/zero/.atom/packages/linter/lib/editor-linter.js:137:20)
    at /home/zero/.atom/packages/linter/lib/linter-views.js:118:22
    at Array.forEach (native)
    at LinterViews.notifyEditorLinter (/home/zero/.atom/packages/linter/lib/linter-views.js:116:19)
    at Linter.createEditorLinter (/home/zero/.atom/packages/linter/lib/linter.coffee:104:12)
    at Commands.toggleLinter (/home/zero/.atom/packages/linter/lib/commands.coffee:28:15)
    at atom-workspace.Commands.subscriptions.add.atom.commands.add.linter:toggle (/home/zero/.atom/packages/linter/lib/commands.coffee:9:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:04.6.0 tree-view:reveal-active-file (atom-text-editor.editor.power-mode.is-focused)
     -0:03.8.0 tree-view:move (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  2x -0:02.7.0 bookmarks:jump-to-next-bookmark (atom-text-editor.editor.mini.is-focused)
     -0:01.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
  2x -0:01.0 window:toggle-full-screen (atom-text-editor.editor.power-mode.is-focused)
  2x -0:00.4.0 linter:toggle (atom-text-editor.editor.power-mode.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "metrics",
      "autocomplete-google-suggest"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "._*",
      "Thumbs.db",
      "*.pyc",
      "__pycache__"
    ],
    "themes": [
      "atom-material-ui",
      "atom-material-syntax-dark"
    ]
  },
  "linter": {
    "errorPanelHeight": 32,
    "showErrorPanel": false,
    "statusIconScope": "File"
  }
}

Installed Packages

# User
activate-power-mode, v0.5.2 (active)
atom-fuzzy-grep, v0.13.0 (inactive)
atom-jade, v0.3.0 (active)
atom-jinja2, v0.5.0 (active)
atom-material-syntax, v0.4.6 (inactive)
atom-material-syntax-dark, v0.2.5 (active)
atom-material-syntax-light, v0.4.5 (inactive)
atom-material-ui, v1.2.11 (active)
atomic-chrome, v0.3.0 (active)
autocomplete-google-suggest, v1.1.0 (inactive)
autocomplete-paths, v1.0.2 (active)
autocomplete-python, v1.7.2 (active)
color-picker, v2.1.1 (active)
cursor-indicator, v1.2.7 (active)
dracula-theme, v1.2.5 (inactive)
dracula-ui, v0.3.0 (inactive)
editor-stats, v0.17.0 (active)
git-plus, v5.13.4 (inactive)
git-time-machine, v1.5.2 (inactive)
highlight-bad-chars, v1.0.5 (active)
highlight-selected, v0.11.2 (active)
language-restructuredtext, v0.13.0 (active)
linter, v1.11.4 (active)
linter-eslint, v7.2.2 (active)
linter-flake8, v1.13.0 (active)
linter-jshint, v2.1.0 (active)
linter-less, v2.5.0 (active)
livereload, v0.4.4 (active)
merge-conflicts, v1.4.2 (active)
minimap, v4.23.5 (active)
minimap-cursorline, v0.1.0 (active)
minimap-find-and-replace, v4.5.1 (active)
minimap-git-diff, v4.3.1 (active)
minimap-highlight-selected, v4.4.0 (active)
minimap-selection, v4.4.0 (active)
pigments, v0.26.2 (active)
python-indent, v0.4.3 (active)
python-isort, v0.0.7 (active)
python-tools, v0.6.7 (active)
shell-it, v0.2.1 (inactive)
split-diff, v0.7.5 (inactive)
sync-settings, v0.7.2 (active)
tornado-templates, v0.2.0 (active)
travis-ci-status, v1.0.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.1 (inactive)
one-light-ui, v1.3.1 (inactive)
one-dark-syntax, v1.2.0 (inactive)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.10.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (active)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.38.1 (active)
fuzzy-finder, v1.0.6 (active)
git-diff, v1.0.1 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.30.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.57.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (inactive)
notifications, v0.64.0 (active)
open-on-github, v1.1.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.236.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.2.6 (active)
styleguide, v0.45.2 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.93.2 (active)
timecop, v0.33.1 (active)
tree-view, v0.206.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.51.5 (active)
language-clojure, v0.20.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.1 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.18.0 (active)
language-javascript, v0.110.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.0 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.43.2 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.51.1 (active)
language-shellscript, v0.22.2 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.27.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.6 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
Arcanemagus commented 8 years ago

Do you get this error on the current stable or beta builds?

For reference, originally filed as https://github.com/steelbrain/linter/issues/1150.

paradoxxxzero commented 8 years ago

I only use the git version and I started to have this error on a very recent pull (3 or 4 days ago) sadly I don't remember what was the last working revision.

On Fri, May 13, 2016, 19:38 Landon Abney notifications@github.com wrote:

Do you get this error on the current stable or beta builds?

For reference, originally filed as steelbrain/linter#1150 https://github.com/steelbrain/linter/issues/1150.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/AtomLinter/linter-flake8/issues/196#issuecomment-219110119

jackwilsdon commented 8 years ago

I am also experiencing this on linter-flake8 v1.13.0 , originally opened an issue at steelbrain/linter#1172.

Arcanemagus commented 8 years ago

Are either of you able to share a file to reproduce this? I don't see this on v1.9.0-beta0...

jackwilsdon commented 8 years ago

My current revision of setup.py from beetbox/beets is what causes the issue I mentioned in steelbrain/linter#1172. Here's the full stack trace I get:

TypeError: Invalid Point: (26, NaN)
    at Function.module.exports.Point.assertValid (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/point.js:63:15)
    at TextBuffer.module.exports.TextBuffer.clipPosition (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1080:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1068:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:192:46)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.markBufferRange (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/display-marker-layer.js:74:62)
    at TextEditor.module.exports.TextEditor.markBufferRange (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:1574:38)
    at /Users/jack/.atom/packages/linter/lib/editor-linter.js:50:34
    at Function.module.exports.Emitter.simpleDispatch (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at EditorLinter.addMessage (/Users/jack/.atom/packages/linter/lib/editor-linter.js:137:20)
    at /Users/jack/.atom/packages/linter/lib/linter-views.js:104:22
    at Array.forEach (native)
    at LinterViews.notifyEditorLinters (/Users/jack/.atom/packages/linter/lib/linter-views.js:102:11)
    at LinterViews.render (/Users/jack/.atom/packages/linter/lib/linter-views.js:59:10)
    at /Users/jack/.atom/packages/linter/lib/linter.coffee:39:14
    at Function.module.exports.Emitter.simpleDispatch (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Users/jack/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at MessageRegistry.updatePublic (/Users/jack/.atom/packages/linter/lib/message-registry.js:84:18)
    at UpdateMessages (/Users/jack/.atom/packages/linter/lib/message-registry.js:24:16)
Arcanemagus commented 8 years ago

It looks like this is a *NIX specific issue, as I am still unable to reproduce this on my Windows machine. I'll try to fire up a VM and reproduce this soon, unless somebody that actually sees this issue traces it down first.

Arcanemagus commented 8 years ago

Tested both of the following:

On the following: OS: Ubuntu 16.04 Atom: 1.10.0-dev-192d0a5

With no luck 😕

@jackwilsdon Can you place a breakpoint here and check result.stdout to see the raw output of flake8 that Atom is getting?

Then put a breakpoint here to see the finaly parsed message list, one of these must have an undefined for one of the columns in the range property of a message, compare that to the raw output and see if you can figure out what is triggering this.

lexicalunit commented 8 years ago

Just got this today after updating the linter package to v1.11.5. My linter-flake8 package v1.12.0.

[Enter steps to reproduce below:]

  1. Open a python file.
  2. Lint.

Atom Version: 1.9.0-beta0 System: Mac OS X 10.11.5 Thrown From: linter package, v1.11.5

Stack Trace

Uncaught TypeError: Invalid Point: (21, NaN)

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

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

Commands

Config

{
  "core": {
    "audioBeep": false,
    "disabledPackages": [
      "autocomplete",
      "exception-reporting",
      "autoflow",
      "autosave",
      "background-tips",
      "bookmarks",
      "encoding-selector",
      "language-toml",
      "metrics",
      "open-on-github",
      "styleguide",
      "update-package-dependencies",
      "welcome",
      "atom-pair",
      "rainbow-selection",
      "opened-files",
      "minimap-codeglance",
      "rst-preview-pandoc",
      "swackets",
      "todo-show",
      "symbols-tree-view",
      "wrap-guide",
      "language-python",
      "activate-power-mode"
    ],
    "themes": [
      "native-ui",
      "solarized-light-syntax"
    ]
  },
  "linter": {
    "lintOnChange": true,
    "lintOnFlyInterval": 10000
  }
}

Installed Packages

# User
activate-power-mode, v0.5.2 (inactive)
api-workbench, v0.8.30 (active)
atom-pair, v2.0.10 (inactive)
autocomplete-go, v1.1.0 (active)
autocomplete-python, v1.7.5 (active)
autoupdate-packages, v1.3.1 (active)
builder-go, v1.0.0 (active)
column-select, v0.2.0 (active)
cursor-indicator, v1.2.7 (active)
event-watch, v3.9.1 (active)
file-icons, v1.7.13 (active)
git-time-machine, v1.5.3 (inactive)
go-config, v1.1.4 (active)
go-get, v1.0.3 (active)
go-plus, v4.1.0 (active)
gofmt, v1.1.6 (active)
gometalinter-linter, v1.1.0 (active)
gorename, v1.0.2 (active)
gruvbox, v1.0.5 (inactive)
highlight-selected, v0.11.2 (active)
isotope-light-ui, v2.2.6 (inactive)
isotope-ui, v2.7.1 (inactive)
language-applescript, v0.2.2 (inactive)
language-cmake, v0.1.4 (active)
language-diff, v0.4.0 (active)
language-docker, v1.1.6 (active)
language-groovy, v0.6.0 (active)
language-json, v0.18.0 (active)
language-latex, v0.6.1 (active)
language-restructuredtext, v0.16.0 (active)
language-rust, v0.4.6 (active)
line-length-break, v0.4.0 (inactive)
linter, v1.11.5 (active)
linter-clang, v3.4.4 (active)
linter-coffeelint, v1.1.2 (active)
linter-csslint, v1.3.2 (active)
linter-docker, v0.1.2 (active)
linter-erb, v1.0.2 (active)
linter-flake8, v1.12.0 (active)
linter-jsonlint, v1.2.5 (active)
linter-just-say-no, v0.6.1 (active)
linter-raml, v0.2.2 (active)
linter-shellcheck, v1.2.0 (active)
linter-tidy, v2.1.1 (active)
linter-write-good, v0.6.1 (active)
MagicPython, v0.5.11 (active)
merge-conflicts, v1.4.4 (active)
minimap, v4.24.3 (active)
minimap-codeglance, v0.4.5 (inactive)
minimap-find-and-replace, v4.5.1 (active)
minimap-git-diff, v4.3.1 (active)
minimap-highlight-selected, v4.4.0 (active)
minimap-selection, v4.4.0 (active)
monokai, v0.18.0 (inactive)
multi-wrap-guide, v0.24.0 (active)
native-ui, v0.18.2 (active)
navigator-godef, v1.0.3 (active)
next-occurrence, v0.5.0 (inactive)
nvatom, v0.10.0 (active)
pretty-json, v1.4.1 (active)
python-isort, v0.0.7 (active)
python-yapf, v0.10.0 (active)
rainbow-selection, v0.3.1 (inactive)
raml, v0.2.0 (active)
red-wavy-underline, v0.3.0 (active)
rst-preview-pandoc, v0.1.12 (inactive)
script, v3.7.3 (inactive)
set-syntax, v0.3.0 (active)
soft-wrap-indicator, v0.7.0 (active)
sort-lines, v0.14.0 (inactive)
swackets, v0.10.0 (inactive)
symbols-tree-view, v0.13.2 (inactive)
tab-control, v0.6.9 (active)
tabs-to-spaces, v1.0.2 (active)
tester-go, v1.0.4 (active)
todo-show, v1.6.0 (inactive)
toggle-quotes, v1.0.0 (inactive)
trailing-spaces, v0.3.2 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (inactive)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (inactive)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (active)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (inactive)
background-tips, v0.26.0 (inactive)
bookmarks, v0.41.0 (inactive)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.38.1 (inactive)
fuzzy-finder, v1.2.0 (active)
git-diff, v1.0.1 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (inactive)
notifications, v0.64.1 (active)
open-on-github, v1.1.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.3.1 (active)
styleguide, v0.46.0 (inactive)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.34.0 (inactive)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (inactive)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (inactive)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (inactive)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

(Cross posting from https://github.com/steelbrain/linter/issues/1116#issuecomment-224893024)

lzkelley commented 8 years ago

Atom Version: 1.9.0-beta0 System: Mac OS X 10.11.2 Thrown From: linter package, v1.11.6

Stack Trace

Uncaught TypeError: Invalid Point: (5, NaN)

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

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

Commands

     -1:45.3.0 find-and-replace:show (atom-text-editor.editor.is-focused)
  4x -1:42.7.0 find-and-replace:find-next (atom-text-editor.editor.mini.is-focused)
     -1:33.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:05.1.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:04.8.0 atomic-emacs:previous-line (atom-text-editor.editor.is-focused)
     -0:01.9.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:01.0 editor:move-to-beginning-of-line (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:00.7.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "allowPendingPaneItems": false,
    "disabledPackages": [
      "language-python",
      "symbols-tree-view"
    ],
    "ignoredNames": [
      ".*",
      "*~",
      "*.pdf",
      "*.png",
      "*.pyc",
      "*.npz"
    ],
    "openEmptyEditorOnStart": false
  },
  "linter": {
    "showErrorInline": false,
    "showErrorPanel": false
  }
}

Installed Packages

# User
atomic-emacs, v0.9.1 (active)
file-watcher, v0.4.0 (active)
language-cython, v0.3.0 (active)
linter, v1.11.6 (active)
linter-flake8, v1.13.0 (active)
MagicPython, v0.5.11 (active)
minimap, v4.24.4 (active)
minimap-cursorline, v0.2.0 (active)
symbols-tree-view, v0.13.2 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.38.1 (active)
fuzzy-finder, v1.2.0 (active)
git-diff, v1.0.1 (active)
find-and-replace, v0.198.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.1.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.3.1 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (inactive)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
Arcanemagus commented 8 years ago

This will not be fixed until somebody on OS X runs through the debugging steps outlined here to start the process of figuring out how this is breaking on OS X. I have no machine to reproduce this with myself.

tfiala commented 8 years ago

I can get the breakpoint data if you can tell me how to set a breakpoint. :-)

Arcanemagus commented 8 years ago
  1. View -> Developer -> Toggle Developer Tools
  2. Sources tab
  3. Find this package's files in the tree on the left
  4. Click the line numbers indicated above

If you have any issues just let me know.

tfiala commented 8 years ago

Okay, thanks @Arcanemagus. Hope to have that for you in a few minutes here.

tfiala commented 8 years ago

For breakpoint 1: the raw output of flake8 in my case is:

"stdin:6:1: F401 'fileinput' imported but unused stdin:126:21: F821 undefined name 'PID_REGEX' stdin:149:9: F841 local variable 'kill_output' is assigned to but never used stdin:232:26: F821 undefined name 'TCPRELAY_RE' stdin:238:28: F821 undefined name 'PORTOFFSET_RE'"

For the final return value, I'm seeing an array with five entries. The first entry has a range where both elements of the range have index[1] values with NaN. The error message for that one was: "F401 — 'fileinput' imported but unused"

The four other error messages had ranges without the NaN.

So perhaps related to the parsing of the unused import?

tfiala commented 8 years ago

And, if I remove the unused import, the rest of the warnings come through the linter just fine.

tfiala commented 8 years ago

Here's what I'm seeing: In extractRange, lines 48-63, where it handles the unused import, the offset starts at 0 but goes to NaN when it looks like something invalid is added to it. That then throws off the logic for returning the range of lines where the warning occurs.

tfiala commented 8 years ago

In extractRange, lines 48-63, where it handles the unused import, the offset starts at 0 but goes to NaN

And that happens during the pass where it detects the import token, and tries to add token.bufferDelta, but token.bufferDelta is not defined.

tfiala commented 8 years ago

For me, the following diff fixed it:

diff --git a/lib/main.coffee b/lib/main.coffee
index f7c2913..c77b9c1 100644
--- a/lib/main.coffee
+++ b/lib/main.coffee
@@ -63,10 +56,14 @@ extractRange = ({code, message, lineNumber, colNumber, textEditor}) ->
           break
         for token in tokenizedLine.tokens
           if foundImport and token.value is symbol
-            return [[lineNumber, offset], [lineNumber, offset + token.value.length]]
+            endOffset = offset
+            if (token.bufferDelta?)
+              endOffset += token.bufferDelta
+            return [[lineNumber, offset], [lineNumber, endOffset]]
           if token.value is 'import' and 'keyword.control.import.python' in token.scopes
             foundImport = true
-          offset += token.value.length
+          if (token.bufferDelta?)
+            offset += token.bufferDelta
         lineNumber += 1
     when 'F821', 'F841'
       # F821 - undefined name 'SYMBOL'
Arcanemagus commented 8 years ago

Hmmm, what does the token object look like? (screenshot of dev tools, or a JSON.stringify)

That whole section of code is unfortunately using an undocumented non-public part of the Atom code, so breakages are likely, there is no public way to get the required information though.

tfiala commented 8 years ago

There's a member "scopes", which is an array of one entry, with the entry as a string called "source.python". Then there's the value member, which is set to "import", "fileinput", etc. (i.e. the syntax elements of the import line). There is no bufferDelta in sight.

tildebyte commented 8 years ago

I'm seeing this on Windows 7 Pro, 1.9 beta 0. I was also seeing errors on the last couple of 1.8 betas, but I had to live with it as I didn't have time to mess with it, so I can't say for certain that it was the same issue. I'll paste more info in here as I have time to collect it.

Arcanemagus commented 8 years ago

This is just plain bizarre... Are you sure that you are on v1.9.0-beta0? token.bufferDelta was removed in the massive rewrite of that code that is landing in v1.9.0, and in fact is not existent for me: image

As you can see though, token.value.length does exist, and existed on both v1.8.0 and v1.9.0-beta0 for me, does it not exist for you?

lzkelley commented 8 years ago

Would it be helpful if I went through the debugging steps also --- to get another set of data?

Arcanemagus commented 8 years ago

Wow! I just realized what is wrong... the changes to accommodate v1.9.0 never got released!

Pushing out a new version including those shortly.

Arcanemagus commented 8 years ago

v1.13.1 should work for everyone, if you are still experiencing issues please let me know.

lzkelley commented 8 years ago

Atom Version: 1.9.0-beta0 System: Mac OS X 10.11.2 Thrown From: linter package, v1.11.9

Stack Trace

Uncaught TypeError: Invalid Point: (88, NaN)

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

TypeError: Invalid Point: (88, NaN)
    at Function.module.exports.Point.assertValid (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/point.js:63:15)
    at TextBuffer.module.exports.TextBuffer.clipPosition (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1080:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1068:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-layer.js:192:46)
    at DisplayMarkerLayer.module.exports.DisplayMarkerLayer.markBufferRange (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/display-marker-layer.js:74:62)
    at TextEditor.module.exports.TextEditor.markBufferRange (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:1574:38)
    at /Users/lzkelley/.atom/packages/linter/lib/editor-linter.js:50:34
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at EditorLinter.addMessage (/Users/lzkelley/.atom/packages/linter/lib/editor-linter.js:137:20)
    at /Users/lzkelley/.atom/packages/linter/lib/linter-views.js:109:22
    at Array.forEach (native)
    at LinterViews.notifyEditorLinters (/Users/lzkelley/.atom/packages/linter/lib/linter-views.js:107:11)
    at LinterViews.render (/Users/lzkelley/.atom/packages/linter/lib/linter-views.js:59:10)
    at /Users/lzkelley/.atom/packages/linter/lib/linter.coffee:39:14
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at MessageRegistry.updatePublic (/Users/lzkelley/.atom/packages/linter/lib/message-registry.js:84:18)
    at UpdateMessages (/Users/lzkelley/.atom/packages/linter/lib/message-registry.js:24:16)

Commands

  2x -5:04.4.0 core:save (atom-text-editor.editor.is-focused)
     -3:24.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:23.7.0 core:save (atom-text-editor.editor.is-focused)
  5x -3:23.2.0 atomic-emacs:previous-line (atom-text-editor.editor.is-focused)
  7x -3:22.5.0 core:select-up (atom-text-editor.editor.is-focused)
     -3:19 core:backspace (atom-text-editor.editor.is-focused)
     -3:18.3.0 core:save (atom-text-editor.editor.is-focused)
     -3:17.2.0 atomic-emacs:next-line (atom-text-editor.editor.is-focused)
  3x -3:17 atomic-emacs:previous-line (atom-text-editor.editor.is-focused)
  2x -3:16 atomic-emacs:kill-line (atom-text-editor.editor.is-focused)
  3x -3:15.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:47.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:46.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:43.2.0 settings-view:open (atom-text-editor.editor.is-focused)
     -0:29.3.0 core:close (div.panels-item)
  2x -0:01.7.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "allowPendingPaneItems": false,
    "disabledPackages": [
      "language-python",
      "symbols-tree-view",
      "linter-markdown"
    ],
    "ignoredNames": [
      ".*",
      "*~",
      "*.pdf",
      "*.png",
      "*.pyc",
      "*.npz"
    ],
    "openEmptyEditorOnStart": false
  },
  "linter": {
    "showErrorPanel": false
  }
}

Installed Packages

# User
atomic-emacs, v0.9.1 (active)
file-watcher, v0.4.0 (active)
language-cython, v0.3.0 (active)
language-restructuredtext, v0.16.0 (active)
linter, v1.11.9 (active)
linter-flake8, v1.13.1 (active)
linter-markdown, v1.5.2 (inactive)
MagicPython, v0.5.11 (active)
markdown-scroll-sync, v2.1.2 (active)
markdown-writer, v2.3.4 (active)
minimap, v4.24.4 (active)
minimap-cursorline, v0.2.0 (active)
pretty-json, v1.4.1 (active)
symbols-tree-view, v0.13.2 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.38.1 (active)
fuzzy-finder, v1.2.0 (active)
git-diff, v1.0.1 (active)
find-and-replace, v0.198.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.1.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.0 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.3.1 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (active)
tabs, v0.98.0 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (inactive)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
Arcanemagus commented 8 years ago

@lzkelley Dang, can you put a breakpoint here and see what token looks like? Specifically which of these exist, and what their value is:

lzkelley commented 8 years ago

@Arcanemagus sorry, first time in the developer tools... it wont let me break at 67, it just keeps jumping down to 71... 68 works? Clicking on line 64 set a breakpoint at 67... okay.

After breaking on 71, it shows on line 64: tokenizedLine = TokenizedLine {id: 51356, openScopes: Array[1], text: " sav = None", tags: Array[10], ruleStack: Array[1]…}

Breaking at 67: tokenizedLine is undefined... looking above a bit, it says offset is undefined also. Even though it is being set on line 60


Possibly unrelated the Console is full of the following messages, which are produced right before the breakpoint (above) was hit

/Applications/Atom Beta.app/Contents/Resources/app.asar/src/state-store.js:31 Uncaught (in promise) TypeError: Cannot read property 'transaction' of null
at dbPromise.then.db (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/state-store.js:31:25)
Arcanemagus commented 8 years ago

Welcome to the joy of Coffeescript and sourcemaps 😛. The source file shown there isn't what Atom is actually running, so it's trying to map the breakpoints you are attempting to set back to the real code that is being used, which is why when you click on one line it jumps to another. I can imagine that being very confusing for somebody unfamiliar with it, sorry!

Since it seems to be bouncing back and forth between one impossible thing to another, would anyone mind sharing their screen to help get this diagnosed? I'm available on Atom's Slack instance.

lzkelley commented 8 years ago

I also tried breaking at Line 62. In this case, tokenizedLine.tokens seems to have 7 elements. All of them have a value, but none have a bufferDelta. The token with token.value = 'import' also has 'keyword.control.import.python' in the scopes array (but again, no bufferDelta). I've never tried Slack, but if it's not too hard to setup -- I'm happy to.

Arcanemagus commented 8 years ago

Here is where you can get signed up.

ataraxus commented 8 years ago

Hey having some issues with the yaml linter integration it gives me regularly this error: Sadly I cant share my yaml its proprietary... if this is not the right place to post this or if i can somehow contribute, please ping me. Thanks!

Atom Version: 1.11.1 Electron Version: 0.37.8 System: KOENB21339 Thrown From: linter package, v1.11.18

Stack Trace

Uncaught TypeError: Invalid Point: (688, NaN)

At C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\point.js:63

TypeError: Invalid Point: (688, NaN)
    at Function.module.exports.Point.assertValid (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\point.js:63:15)
    at TextBuffer.module.exports.TextBuffer.clipPosition (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1099:13)
    at TextBuffer.module.exports.TextBuffer.clipRange (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1087:20)
    at MarkerLayer.module.exports.MarkerLayer.markRange (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\marker-layer.js:196:46)
    at TextBuffer.module.exports.TextBuffer.markRange (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:790:38)
    at C:/Users/a/.atom/packages/linter/lib/editor-linter.js:50:46
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:129:28)
    at EditorLinter.addMessage (C:/Users/a/.atom/packages/linter/lib/editor-linter.js:143:20)
    at C:/Users/a/.atom/packages/linter/lib/linter-views.js:111:22
    at Array.forEach (native)
    at LinterViews.notifyEditorLinters (C:/Users/a/.atom/packages/linter/lib/linter-views.js:109:11)
    at LinterViews.render (C:/Users/a/.atom/packages/linter/lib/linter-views.js:58:10)
    at C:\Users\a\.atom\packages\linter\lib\linter.coffee:70:30
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\a\AppData\Local\atom\app-1.11.1\resources\app.asar\node_modules\event-kit\lib\emitter.js:129:28)
    at MessageRegistry.updatePublic (C:/Users/a/.atom/packages/linter/lib/message-registry.js:84:18)
    at UpdateMessages (C:/Users/a/.atom/packages/linter/lib/message-registry.js:24:16)

Commands

     -0:53.6.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:52.8.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:33.8.0 core:cut (atom-text-editor.editor.is-focused)
  3x -0:32.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:25.4.0 core:paste (atom-text-editor.editor.is-focused)
     -0:23.1.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:23.1.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:23.1.0 editor:indent (atom-text-editor.editor.is-focused)
     -0:22.9.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:22.9.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:22.9.0 editor:indent (atom-text-editor.editor.is-focused)
     -0:22.5.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:22.5.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:22.5.0 editor:indent (atom-text-editor.editor.is-focused)
     -0:21.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:01.5.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "C:\\Users\\a\\git",
    "telemetryConsent": "limited"
  }
}

Installed Packages

# User
atom-beautify, v0.29.13 (active)
atom-typescript, v10.1.8 (active)
keyboard-localization, v1.4.18 (active)
line-ending-converter, v1.3.2 (active)
linter, v1.11.18 (active)
linter-swagger, v0.3.6 (active)
linter-tslint, v0.11.1 (active)
minimap, v4.25.0 (active)
minimap-pigments, v0.2.1 (active)
pigments, v0.37.0 (active)
split-diff, v1.0.5 (inactive)
tortoise-svn, v0.5.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.201.1 (active)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (active)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
Arcanemagus commented 8 years ago

@ataraxus Can you please file that over on linter-js-yaml?

Arcanemagus commented 8 years ago

The functionality behind this got a major re-working and simplification in #255, I'm going to mark that as closed. If you are still seeing this when #255 gets released please file a new issue.