dart-sublime-bundle icon indicating copy to clipboard operation
dart-sublime-bundle copied to clipboard

After 1.4.0 analysis no longer works

Open ceronman opened this issue 9 years ago • 15 comments

I get the following error in the console:

Dart: Analyzer started.
could not start RequestHandler properly
could not start ResponseHandler properly
could not start StdoutWatcher properly

I'm not sure how to get better debugging information.

ceronman avatar May 12 '15 19:05 ceronman

Thanks for the report!

Please run Dart: Check Configuration from the command palette and post the results.

guillermooo avatar May 12 '15 19:05 guillermooo

Hi this is what check configuration gives me:

Sublime Text Information
================================================================================
version: 3083 (stable channel)
platform: linux
architecture: x64

Dart SDK Information
================================================================================
version: Dart VM version: 1.10.0 (Fri Apr 24 04:00:49 2015) on "linux_x64"

Dart Package Settings
================================================================================
dart_sdk_path: /opt/google/dartsdk
dart_dartium_path: /opt/google/dartium/chrome
dart_user_browsers: 
{}

Project Information
================================================================================
/home/ceronman/git/dartcade/pubspec.yaml

ceronman avatar May 12 '15 21:05 ceronman

Did the analysis service API change?

sethladd avatar May 12 '15 21:05 sethladd

I've just tried on Lubuntu 32bit with the 1.10 SDK in a Hyper-V VM and everything is working fine, even the new tooltips.

Have you restarted ST after the upgrade?

guillermooo avatar May 12 '15 21:05 guillermooo

Weird, it was just working for me with the previous version. I was checking the Sublime console and I found the following error, maybe it could give some light:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 208, in on_load
    callback.on_load(v)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 140, in on_load
    g_server.send_remove_content(view)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 427, in send_remove_content
    block=False)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/lib/analyzer/queue.py", line 91, in put
    super().put(data.to_json(), *args, **kwargs)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/lib/analyzer/queue.py", line 77, in put
    super().put((priority, json.dumps(data)), block, timeout)
  File "./queue.py", line 146, in put
  File "./queue.py", line 230, in _put
TypeError: unorderable types: NoneType() < int()

I'll keep investigating to see if I can find more valuable debugging info.

ceronman avatar May 12 '15 21:05 ceronman

Btw, yes, I have restarted sublime multiple times.

ceronman avatar May 12 '15 21:05 ceronman

  • Go to Packages/Dart/sublime_plugin_lib/init.py
  • Set logging.ERROR to logging.DEBUG
  • Restart ST
  • Check the output in the console

guillermooo avatar May 12 '15 22:05 guillermooo

Some details after more investigation:

  • This seems to be a race condition within the threads. After many restarts of sublime, the analyzer sometimes starts, sometimes it doesn't.
  • I put a print of the stacktrace in the lines producing the error and I got this:
Traceback (most recent call last):
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 456, in run
    self.server.ready_barrier.wait()
  File "./threading.py", line 610, in wait
  File "./threading.py", line 650, in _wait
threading.BrokenBarrierError
  • Changing the logging to logging.DEBUG doesn't seem to have any useful effect. For some reason things are not written in the console.

ceronman avatar May 12 '15 22:05 ceronman

Thanks for that. I'd wager you have other plugins that don't play well with Dart. You should see debugging output, though.

guillermooo avatar May 12 '15 22:05 guillermooo

You can also try incrementing the Barrier timeout in analyzer.py and see if that helps.

guillermooo avatar May 12 '15 22:05 guillermooo

I think I found the problem in Dart/analyzer.py the threading barrier defined in line 269:

_ready_barrier = threading.Barrier(4, timeout=5)

This barrier is timing out, maybe because of other plugins. I increased the time out and now the the analyzer works.

Also, I removed all other plugins and still don't see any logger output.

ceronman avatar May 12 '15 23:05 ceronman

about the ouput, if you have multiple ST windows open, it's possible that the output will only be visible in the first one.

guillermooo avatar May 12 '15 23:05 guillermooo

I confirm that the same barrier issue happens with Mac OS X.

ceronman avatar May 13 '15 09:05 ceronman

Is this with or without other plugins installed and enabled? If other plugins are involved, could you please list which ones?

guillermooo avatar May 13 '15 21:05 guillermooo

50c25b4fb5993aea51d21510a53cb35565e67ad6

guillermooo avatar Jun 14 '15 07:06 guillermooo