Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Invalid Point: (14, NaN) #560

Closed
ghost opened this issue Jun 11, 2015 · 4 comments
Closed

Uncaught TypeError: Invalid Point: (14, NaN) #560

ghost opened this issue Jun 11, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 11, 2015

For more background, please see atom/atom#7077

Steps:

  1. play a bit with a bad xml file

Atom Version: 0.209.0
System: linux 4.0.5-1-ARCH
Thrown From: linter package, v0.12.7

Stack Trace

Uncaught TypeError: Invalid Point: (14, NaN)

At /usr/share/atom/resources/app.asar/src/display-buffer.js:38

TypeError: Invalid Point: (14, NaN)
  at Function.module.exports.Point.assertValid (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/point.js:65:15)
  at TextBuffer.module.exports.TextBuffer.clipPosition (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:956:13)
  at TextBuffer.module.exports.TextBuffer.clipRange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:944:20)
  at TextBuffer.module.exports.TextBuffer.markRange (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:674:46)
  at DisplayBuffer.module.exports.DisplayBuffer.markBufferRange (/usr/share/atom/resources/app.asar/src/display-buffer.js:1381:41)
  at TextEditor.module.exports.TextEditor.markBufferRange (/usr/share/atom/resources/app.asar/src/text-editor.js:1265:59)
  at LinterView.createMarker (/home/arch/.config/atom/packages/linter/lib/linter-view.coffee:190:22)
  at LinterView.display (/home/arch/.config/atom/packages/linter/lib/linter-view.coffee:227:17)
  at LinterView.processMessage (/home/arch/.config/atom/packages/linter/lib/linter-view.coffee:178:8)
  at LinterView.processMessage (/home/arch/.config/atom/packages/linter/lib/linter-view.coffee:1:1)
  at /home/arch/.config/atom/packages/linter/lib/linter-view.coffee:164:14
  at LinterXmllint.Linter.processMessage (/home/arch/.config/atom/packages/linter/lib/linter.coffee:241:5)
  at /home/arch/.config/atom/packages/linter/lib/linter.coffee:173:8
  at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
  at /usr/share/atom/resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

  2x -1:49 core:backspace (atom-text-editor.editor.is-focused)
  2x -1:47.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:03.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:02.4.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "audioBeep": false,
    "autoHideMenuBar": true,
    "projectHome": "/data",
    "disabledPackages": [
      "language-make",
      "autocomplete-css",
      "autocomplete-html",
      "autocomplete-plus",
      "autocomplete-snippets",
      "autosave",
      "autoflow",
      "background-tips",
      "deprecation-cop",
      "incompatible-packages",
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-gfm",
      "language-go",
      "language-java",
      "autocomplete-atom-api",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-property-list",
      "language-ruby",
      "language-ruby-on-rails",
      "language-sql",
      "language-toml",
      "language-yaml",
      "markdown-preview",
      "open-on-github",
      "package-generator",
      "spell-check",
      "timecop",
      "welcome",
      "linter-tidy"
    ]
  },
  "linter": {}
}

Installed Packages

# User
emmet, v2.3.10
file-icons, v1.5.7
language-generic-config, v0.2.0
linter, v0.12.7
linter-flake8, v1.4.2
linter-xmllint, v0.0.6
pdf-view, v0.22.0
tabs-to-spaces, v0.11.0

# Dev
No dev packages
@maxbrunsfeld
Copy link

@andya9 I could be wrong, but I think that the root cause here is linter-xmllint returning an invalid error object.

@ghost
Copy link
Author

ghost commented Jun 12, 2015

Should I move this to linter-xmllint?

@ghost
Copy link
Author

ghost commented Jun 12, 2015

Nevermind, I think I solved this using your suggestion in atom/atom#7077 ...
I’ll send a pull request in linter-xmllint as soon as I’m sure it works

EDIT: no, I was wrong, I couldn’t fix it; but it seems that the problem is that sometimes xmllint outputs messages like "couldn’t read content of attribute", without ending it with "in line number"

EDIT2: changing the regex from '(?[^\\^]*)\^' to '(?\d+): ' solves this issue. But then some errors will not be detected anymore, such as: not having the start tag of the root element

@ghost
Copy link
Author

ghost commented Jun 12, 2015

I close here, as it’s obviously related to linter-xmllint way to parse output

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant