Skip to content

Plugin crashes when using autocomplete shortcut while method signature popover is active #379

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

Closed
mochtu opened this issue Oct 21, 2015 · 7 comments

Comments

@mochtu
Copy link

mochtu commented Oct 21, 2015

Sublime Text 3 / OSX

For some reason, when I accidentally use the Ctrl+Space (autocomplete) shortcut while a method signature popover is displayed, the typescript plugin stops working (without an error).

An example would be:

angular.module(∆)

where "∆" represents the cursor position.

When I press Ctrl+Space again, I get the following stack trace in the sublime console:

insert_snippet
Exception in thread Thread-1:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "./threading.py", line 858, in run
  File "/Users/mo/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/node_client.py", line 283, in __reader
    if NodeCommClient.read_msg(stream, msgq, eventq, asyncReq, proc, eventHandlers):
  File "/Users/mo/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/node_client.py", line 182, in read_msg
    data_dict = json_helpers.decode(data_json)
  File "/Users/mo/Library/Application Support/Sublime Text 3/Packages/TypeScript/typescript/libs/json_helpers.py", line 18, in decode
    return json.loads(json_str)
  File "./json/__init__.py", line 319, in loads
  File "./json/decoder.py", line 352, in decode
  File "./json/decoder.py", line 368, in raw_decode
  File "./json/scanner.py", line 38, in _scan_once
  File "./json/decoder.py", line 198, in JSONObject
  File "./json/scanner.py", line 40, in _scan_once
  File "./json/decoder.py", line 242, in JSONArray
  File "./json/scanner.py", line 38, in _scan_once
  File "./json/decoder.py", line 198, in JSONObject
  File "./json/scanner.py", line 35, in _scan_once
  File "./json/decoder.py", line 100, in py_scanstring
ValueError: Invalid control character '\r' at: line 1 column 65532 (char 65531)
@zhengbli
Copy link
Contributor

What version of node are you using?

@mochtu
Copy link
Author

mochtu commented Oct 21, 2015

~ $ node -v
v4.2.1
~ $ npm -v
2.14.7

@mochtu
Copy link
Author

mochtu commented Oct 21, 2015

And I checked, node_path is correctly set to that executable.

@zhengbli
Copy link
Contributor

Thanks @mochtu. This is a known issue that fs.writeSync truncates long response messages from the server under Node v4 on OSX. I'm working on a fix right now.

@mochtu
Copy link
Author

mochtu commented Oct 21, 2015

Ah, great to hear. Couldn't find any reference to that known issue. Looking forward to your fix :-)

@zhengbli
Copy link
Contributor

Hi @mochtu, a recent change should have fixed the issue. Could you try the bit in the master branch? Thanks!

@mochtu
Copy link
Author

mochtu commented Oct 28, 2015

The issue is fixed for me with #383 ! Thanks

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

No branches or pull requests

3 participants