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

Memory leak in dropdownAction #197767

Closed
SimonSiefke opened this issue Nov 8, 2023 · 2 comments · Fixed by #197769
Closed

Memory leak in dropdownAction #197767

SimonSiefke opened this issue Nov 8, 2023 · 2 comments · Fixed by #197769
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@SimonSiefke
Copy link
Contributor

SimonSiefke commented Nov 8, 2023

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

  • VS Code Version: 1.84.0
  • OS Version: Ubuntu 23.04

Steps to Reproduce:

  1. Open a VSCode Window
  2. Open the extensions view
  3. Search for @builtin html
  4. Search for @builtin css
  5. Search for @builtin html
  6. Notice that the number of event listeners increases between step 3 and step 5.

Test script

git clone git@github.com:SimonSiefke/vscode-memory-leak-finder.git &&
cd vscode-memory-leak-finder &&
git checkout v5.18.0 &&
npm ci &&
node packages/cli/bin/test.js --cwd packages/e2e  --check-leaks --measure event-listeners  --only extension-search &&
cat .vscode-memory-leak-finder-results/event-listeners/sample.extension-search.json

Output

{
  "eventListeners": [
    {
      "type": "-monaco-gesturetap",
      "description": "u=>t.$EP.stop(u,!0)",
      "objectId": "-68213149744141526.4.9298",
      "stack": [
        "listener (vscode-memory-leak-finder/.vscode-test/vscode-linux-x64-1.84.0/resources/app/out/vs/workbench/workbench.desktop.main.js:188:1306)"
      ],
      "sourceMaps": [
        "https://ticino.blob.core.windows.net/sourcemaps/d037ac076cee195194f93ce6fe2bdfe2969cc82d/core/vs/workbench/workbench.desktop.main.js.map"
      ],
      "count": 12,
      "originalStack": ["/src/vs/base/browser/ui/dropdown/dropdown.ts:54:61"]
    },
    {
      "type": "-monaco-gesturetap",
      "description": "u=>{(0,t.$yP)(u)&&(u.detail>1||u.button!==0)||(this.h?this.hide():this.show())}",
      "objectId": "-68213149744141526.4.9302",
      "stack": [
        "listener (vscode-memory-leak-finder/.vscode-test/vscode-linux-x64-1.84.0/resources/app/out/vs/workbench/workbench.desktop.main.js:188:1403)"
      ],
      "sourceMaps": [
        "https://ticino.blob.core.windows.net/sourcemaps/d037ac076cee195194f93ce6fe2bdfe2969cc82d/core/vs/workbench/workbench.desktop.main.js.map"
      ],
      "count": 8,
      "originalStack": ["/src/vs/base/browser/ui/dropdown/dropdown.ts:58:60"]
    },
    {
      "type": "keyup",
      "description": "i=>{const u=new S.$MO(i);(u.equals(3)||u.equals(10))&&(t.$EP.stop(i,!0),this.h?this.hide():this.show())}",
      "objectId": "-68213149744141526.4.9304",
      "stack": [
        "listener (vscode-memory-leak-finder/.vscode-test/vscode-linux-x64-1.84.0/resources/app/out/vs/workbench/workbench.desktop.main.js:188:1522)"
      ],
      "sourceMaps": [
        "https://ticino.blob.core.windows.net/sourcemaps/d037ac076cee195194f93ce6fe2bdfe2969cc82d/core/vs/workbench/workbench.desktop.main.js.map"
      ],
      "count": 4,
      "originalStack": ["/src/vs/base/browser/ui/dropdown/dropdown.ts:73:70"]
    }
  ],
  "isLeak": true
}
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.84.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@bpasero bpasero assigned bpasero and unassigned andreamah Nov 9, 2023
@bpasero bpasero added freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues and removed triage-needed labels Nov 9, 2023
@bpasero bpasero added this to the November 2023 milestone Nov 9, 2023
@bpasero
Copy link
Member

bpasero commented Nov 9, 2023

Thanks for finding these ❤️

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants