Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

autocomplete :Stdout maxBuffer exceeded #640

Closed
ramya-rao-a opened this issue Nov 22, 2016 · 4 comments
Closed

autocomplete :Stdout maxBuffer exceeded #640

ramya-rao-a opened this issue Nov 22, 2016 · 4 comments
Assignees

Comments

@ramya-rao-a
Copy link
Contributor

From @ShiYu-Yang on November 21, 2016 7:27

  • VSCode Version:1.7.1
  • OS Version:Ubuntu 16.04

Language :Golang 1.7

Now,I work with vscode meeting a problem.Our team has an errcode file and it has a log of constants.When I use vscode and autocomplete this package.It doesn't work! I debug it and find such error in console

[Extension Host] rejected promise not handled within 1 second
workbench.main.js:126 stdout maxBuffer exceeded: Error: stdout maxBuffer exceeded
at Socket. (child_process.js:271:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)e.onUnexpectedError @ workbench.main.js:126(anonymous function) @ workbench.main.js:126e.onUnexpectedError @ workbench.main.js:29r @ workbench.main.js:29t.onUnexpectedExtHostError @ workbench.main.js:101e.handle @ workbench.main.js:100s @ workbench.main.js:49f @ workbench.main.js:49_combinedTickCallback @ internal/process/next_tick.js:67_tickCallback @ internal/process/next_tick.js:98

so,how can it work nicely?

Thank you!

Steps to Reproduce:

  1. I work with golang . So it can produce a large go package with a lot of constants
  2. Import it and autocomplete from this package

Copied from original issue: microsoft/vscode#15789

@ramya-rao-a
Copy link
Contributor Author

We use child_process.exec() to run gocode that returns autocomplete suggestions. In your case, since the returned data exceeds the max size of the buffer that is returned by child_process.exec(), you get the error stdout maxBuffer exceeded

We will have to either update the maxBuffer or change child_process.exec() to child_process.spawn.

We will fix this in the next update. Until then, I am sorry there is no workaround to disable autocomplete at the moment

@ShiYu-Yang
Copy link

Thank you very much!

ramya-rao-a added a commit to ramya-rao-a/vscode-go that referenced this issue Nov 29, 2016
@ramya-rao-a
Copy link
Contributor Author

The latest update 0.6.51 has this fix. Happy Coding!

@ShiYu-Yang
Copy link

Yes,it works ! Nice

mattetti added a commit to mattetti/vscode-go that referenced this issue Jan 11, 2017
* 'master' of github.com:mattetti/vscode-go: (128 commits)
  Add telemetry support for the Go extension
  Add dlv path to error msg when dlv not found
  Fixes microsoft#465 outline offset problem in No-English language (microsoft#699)
  fix coverage display when editor changes to undefined (microsoft#693)
  Add support for reading http.proxy setting (microsoft#639)
  Fixing flaky unit tests
  Refactor for corner cases
  Reduce noise in console log due to errors from hover
  Changelog for next update 0.6.51
  Remove space after brackets in snippet as per microsoft#628
  Fixes microsoft#647 Strip version from autocompleted pkgs from gopkg.in (microsoft#659)
  Fixes microsoft#647 Support vendor pkgs from root of GOPATH/src (microsoft#660)
  Fixes microsoft#640 Use spawn to handle big data from gocode (microsoft#661)
  Fixed wrong workspace when one gopath is the substring of another. (microsoft#658)
  Fix "gotests" when generates test for current function for type methods (microsoft#657)
  Add benchmark function snippet (microsoft#648)
  Fix "Go to Definition" when running Go HEAD (microsoft#655)
  Fixes microsoft#642 Only add -d once to formatflags (microsoft#644)
  Updating Changelog and package.json for 0.6.50 update
  Log errors to console
  ...
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants