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

SublimeText locking up #11

Open
jeffdeville opened this issue Mar 6, 2018 · 6 comments
Open

SublimeText locking up #11

jeffdeville opened this issue Mar 6, 2018 · 6 comments

Comments

@jeffdeville
Copy link

I'm getting hard lockups in sublime. If there's a rhyme or reason for what is triggering them, I haven't managed to identify it yet. I'll just be typing, and then beach ball. I suppose the most likely case is a crash on linting, because I've had it crash when I switch to my browser, and can't get back to sublime.

I've cloned master into my plugins directory, but haven't played with sublime plugins much. Is there a way to write the log output to a file instead of the console (that I can't see)? If so, any best practices for helping debug? (I realize I haven't given much to go on)

@edelvalle
Copy link
Owner

Hi @jeffdeville, right now I'm in a "almost non-internet" country. But if you use prints you could see in the terminal, or write your own logger in Python you should be able to log to a file.

I will try to check this problem any way.

Cheers

@jeffdeville
Copy link
Author

Thanks for checking in, @edelvalle. No rush. I do have some new info. The problem is that elixir_sense itself seems to be crashing. If I kill that process, sublime comes back. (Now maybe the processes are linked, and I'm still wrong). Nevertheless, killing the process lets me look at the console. Which... I didn't dig through yesterday because I had a release. But now that I know how to collect more info, I'll hopefully be able to help at least diagnose the cause more completely.

@jeffdeville
Copy link
Author


== Compilation error in file lib/pubsub_contracts/polling_server.ex ==
** (TokenMissingError) lib/pubsub_contracts/polling_server.ex:86: missing terminator: end (for "do" starting at line 1)
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

<_sre.SRE_Match object at 0x10845d1a0> 85 None error None missing terminator: end (for "do" starting at line 1) end
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 40, in on_query_completions
    if s['type'] == 'hint':
TypeError: string indices must be integers
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 40, in on_query_completions
    if s['type'] == 'hint':
TypeError: string indices must be integers
Compiling 10 files (.ex)

== Compilation error in file lib/pubsub_contracts/polling_server.ex ==
** (TokenMissingError) lib/pubsub_contracts/polling_server.ex:86: missing terminator: end (for "do" starting at line 1)
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

<_sre.SRE_Match object at 0x10845d1a0> 85 None error None missing terminator: end (for "do" starting at line 1) end
Compiling 10 files (.ex)

== Compilation error in file lib/pubsub_contracts/polling_server.ex ==
** (TokenMissingError) lib/pubsub_contracts/polling_server.ex:86: missing terminator: end (for "do" starting at line 1)
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

<_sre.SRE_Match object at 0x10845d1a0> 85 None error None missing terminator: end (for "do" starting at line 1) end
Traceback (most recent call last):
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 325, in binary_to_term
    i, term = _binary_to_term(1, data)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 480, in _binary_to_term
    i, value = _binary_to_term(i, data)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 415, in _binary_to_term
    i, tmp = _binary_to_term_sequence(i, length, data)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 528, in _binary_to_term_sequence
    i, element = _binary_to_term(i, data)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 479, in _binary_to_term
    i, key = _binary_to_term(i, data)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 355, in _binary_to_term
    tag = b_ord(data[i])
IndexError: index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 35, in on_query_completions
    suggestions = sense.suggestions(buffer, line, column)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 160, in suggestions
    column=column,
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 115, in _send_request
    data = decode_term(erlang.binary_to_term(response))
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 332, in binary_to_term
    raise ParseException('missing data')
  File "<string>", line None
SuperElixir.super_elixir.erlang.ParseException: <no detail available>
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 35, in on_query_completions
    suggestions = sense.suggestions(buffer, line, column)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 160, in suggestions
    column=column,
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 115, in _send_request
    data = decode_term(erlang.binary_to_term(response))
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/erlang.py", line 323, in binary_to_term
    raise ParseException('invalid version')
  File "<string>", line None
SuperElixir.super_elixir.erlang.ParseException: <no detail available>
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 35, in on_query_completions
    suggestions = sense.suggestions(buffer, line, column)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 160, in suggestions
    column=column,
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 109, in _send_request
    self._socket.send(header + payload)
BrokenPipeError: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/autocomplete.py", line 35, in on_query_completions
    suggestions = sense.suggestions(buffer, line, column)
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 160, in suggestions
    column=column,
  File "/Users/jeff/Library/Application Support/Sublime Text 3/Packages/SuperElixir/super_elixir/sense_client.py", line 109, in _send_request
    self._socket.send(header + payload)
BrokenPipeError: [Errno 32] Broken pipe
Compiling 10 files (.ex)

== Compilation error in file lib/pubsub_contracts/polling_server.ex ==
** (TokenMissingError) lib/pubsub_contracts/polling_server.ex:87: missing terminator: end (for "do" starting at line 1)
    (elixir) lib/kernel/parallel_compiler.ex:198: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

<_sre.SRE_Match object at 0x10845d310> 86 None error None missing terminator: end (for "do" starting at line 1) None

@jeffdeville
Copy link
Author

I think the "Broken pipe" is where I killed elixir_sense.
I'm guessing that your socket does a blocking receive? Then if ElixirSense locks up, then the reply is never sent? I'll try and look at it futher when things at work calm down a bit.

@edelvalle
Copy link
Owner

Yes, right now it works in blocking mode.
I could improve it, but I'm not using the plugin right now and I have my forces focused somewhere else...

@smpallen99
Copy link

any update on this issue? Its very annoying. I'm getting lockups every 10 - 30 minutes.

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

3 participants