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

Auto Complete pops up "invalid arguments" message #27015

Closed
Eli-Goldberg opened this issue May 21, 2017 · 2 comments
Closed

Auto Complete pops up "invalid arguments" message #27015

Eli-Goldberg opened this issue May 21, 2017 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) suggest IntelliSense, Auto Complete verified Verification succeeded

Comments

@Eli-Goldberg
Copy link

An annoying warning message pops when using auto-complete (see image below)
I've disabled all extensions.

  • OS Version: Ubuntu 16.04
  • VSCode Version:
    Version 1.13.0-insider
    Commit cdaa5f2
    Date 2017-05-19T05:11:19.365Z

Steps to Reproduce:

  1. Create new JS file and save it
  2. Start typing "module" and use Tab or Enter to auto complete
  3. Delete the entire word and repeat step 2
  4. A warning message saying: "invalid arguments" will pop up

image

@mjbvz mjbvz assigned jrieken and unassigned mjbvz May 22, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented May 22, 2017

This is not specific to js/ts. Here's repo in a txt file:

  1. Open a new text file.
  2. Enable word based completions
  3. Type out:
abc
ab
  1. Trigger completions on on ab and the type c. Then hit tab

This shows invalid argument as well.


Here are the errors that I see when this happens. First:

/Users/matb/projects/vscode/out/vs/workbench/electron-browser/shell.js:268 Cannot read property 'length' of undefined: TypeError: Cannot read property 'length' of undefined
    at file:///Users/matb/projects/vscode/out/vs/editor/contrib/snippet/browser/snippetSession.js:65:101
    at Model.TextModelWithDecorations._changeDecorations (file:///Users/matb/projects/vscode/out/vs/editor/common/model/textModelWithDecorations.js:173:26)
    at Model.TextModelWithDecorations.changeDecorations (file:///Users/matb/projects/vscode/out/vs/editor/common/model/textModelWithDecorations.js:145:29)
    at OneSnippet.move (file:///Users/matb/projects/vscode/out/vs/editor/contrib/snippet/browser/snippetSession.js:57:44)
    at SnippetSession._move (file:///Users/matb/projects/vscode/out/vs/editor/contrib/snippet/browser/snippetSession.js:270:44)
    at file:///Users/matb/projects/vscode/out/vs/editor/contrib/snippet/browser/snippetSession.js:254:30
    at EditStack.pushEditOperation (file:///Users/matb/projects/vscode/out/vs/editor/common/model/editStack.js:43:87)
    at Model.EditableTextModel._pushEditOperations (file:///Users/matb/projects/vscode/out/vs/editor/common/model/editableTextModel.js:132:41)
    at Model.EditableTextModel.pushEditOperations (file:///Users/matb/projects/vscode/out/vs/editor/common/model/editableTextModel.js:59:29)
    at SnippetSession.insertNested (file:///Users/matb/projects/vscode/out/vs/editor/contrib/snippet/browser/snippetSession.js:253:39)

Which is triggered by this error using -1 to index into the placeholder groups:

screen shot 2017-05-21 at 11 58 24 pm

The actual exception is then in setSelections in commonCodeEditor:

screen shot 2017-05-21 at 11 56 04 pm

@jrieken Can you please take a look

@mjbvz mjbvz added the suggest IntelliSense, Auto Complete label May 22, 2017
@jrieken
Copy link
Member

jrieken commented May 22, 2017

dupe of #26914

@jrieken jrieken closed this as completed May 22, 2017
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label May 22, 2017
@sandy081 sandy081 added the verified Verification succeeded label Jun 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) suggest IntelliSense, Auto Complete verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants