Skip to content

Memory leak in terminal support #111562

@solomatov

Description

@solomatov
  • VSCode Version: 1.51.1
  • OS Version: Darwin x64 19.6.0

Steps to Reproduce:

  1. Open a terminal
  2. Type in the following: while true; do echo test; done
  3. Observe memory consumption: it will increase, and eventually the VS Code will die with a OOM

Does this issue occur when all extensions are disabled?: No

I investigated why it happened, and root caused it to a memory leak in xterm.js

It's possible to work around this issue by getting a buffer once, on xterm object creation, and using this object instead of a terminal.buffer. I checked, and it fixed the above problem. The memory consumption is stable, and vs code doesn't die.

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberinsiders-releasedPatch has been released in VS Code InsidersterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions