SublimeLinter / SublimeLinter-flow

SublimeLinter plugin for JavaScript static type checking, using flow.
MIT License
116 stars 24 forks source link

Error in SublimeLinter daemon #42

Closed artkravchenko closed 6 years ago

artkravchenko commented 8 years ago

Hello. I use Sublime Text 3 (build 3083) with the latest versions of flow (0.33.0), SublimeLinter, SublimeLinter-contrib-eslint and SublimeLinter-flow installed correctly.

This plugin works well for most files I'd like to validate. But it crashes with some huge files that contain over 600 lines of code (not for all of them)

My SublimeLinter configuration file:

{
    "user": {
        "debug": false,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "eslint": {
                "@disable": false,
                "args": [],
                "excludes": []
            },
            "flow": {
                "@disable": false,
                "args": [],
                "excludes": [],
                "libs": [
                    "./src/definitions/lib"
                ],
                "show-all-errors": false
            }
        },
        "mark_style": "squiggly underline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [
                "/home/unexpected/.nvm/versions/node/v6.5.0/bin"
            ],
            "osx": [],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 5,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "JavaScript (Babel)": "javascript",
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python"
        },
        "use-server": false,
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

Error log in Sublime's console:

SublimeLinter: -------------------- 
reloading Packages/User/SublimeLinter.sublime-settings
SublimeLinter: error in SublimeLinter daemon: 
SublimeLinter: -------------------- 
SublimeLinter: Traceback (most recent call last):
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/queue.py", line 57, in loop
    item = self.q.get(block=True, timeout=self.MIN_DELAY)
  File "./queue.py", line 175, in get
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/queue.py", line 65, in loop
    self.lint(view_id, timestamp)
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/queue.py", line 111, in lint
    self.callback(view_id, timestamp)
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/sublimelinter.py", line 119, in lint
    Linter.lint_view(view, filename, code, hit_time, callback)
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/linter.py", line 929, in lint_view
    linter.lint(hit_time)
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/node_linter.py", line 77, in lint
    super(NodeLinter, self).lint(hit_time)
  File "/home/unexpected/.config/sublime-text-3/Packages/SublimeLinter/lint/linter.py", line 1410, in lint
    for match, line, col, error, warning, message, near in self.find_errors(output):
  File "linter in /home/unexpected/.config/sublime-text-3/Installed Packages/SublimeLinter-flow.sublime-package", line 125, in _error_to_tuple
  File "linter in /home/unexpected/.config/sublime-text-3/Installed Packages/SublimeLinter-flow.sublime-package", line 125, in <listcomp>
  File "linter in /home/unexpected/.config/sublime-text-3/Installed Packages/SublimeLinter-flow.sublime-package", line 159, in _format_message
TypeError: object of type 'NoneType' has no len()

SublimeLinter: -------------------- 

What can be the reason of this error? Thank you.

ckaznocha commented 7 years ago

Hey @Oopscurity do you mind trying out the latest release, 4.1.0, to see if this is still an issue?

braver commented 6 years ago

A lot has happened since this issue was opened. Hopefully we fixed this by now. If not, let us know (with full debug logs and settings of course).