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 color picker widget #199814

Closed
SimonSiefke opened this issue Dec 1, 2023 · 1 comment · Fixed by #199815
Closed

Memory leak in color picker widget #199814

SimonSiefke opened this issue Dec 1, 2023 · 1 comment · Fixed by #199815
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders

Comments

@SimonSiefke
Copy link
Contributor

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

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

Steps to Reproduce:

  1. Open a text editor
  2. Open the command palette
  3. Run the Show or Focus Standalone Color Picker command
  4. Once the color picker is visible, press Escape to hide the color picker
  5. Notice that two click event listeners have been added, but not been removed:
{
  "eventListeners": [
    {
      "type": "click",
      "description": "o=>{this.f.fire()}",
      "stack": ["listener (vscode-linux-x64-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:716:18657)"],
      "count": 1,
      "originalStack": ["/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts:458:25"],
      "originalName": "e"
    },
    {
      "type": "click",
      "description": "()=>{this.f.fire()}",
      "stack": ["listener (vscode-linux-x64-1.84.2/resources/app/out/vs/workbench/workbench.desktop.main.js:716:13832)"],
      "count": 1,
      "originalStack": ["/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.ts:120:25"],
      "originalName": null
    }
  ],
  "isLeak": true
}

Automated test script

git clone git@github.com:SimonSiefke/vscode-memory-leak-finder.git &&
cd vscode-memory-leak-finder &&
git checkout v5.29.0 &&
npm ci &&
node packages/cli/bin/test.js --cwd packages/e2e  --check-leaks --measure-after --measure event-listeners --runs 7  --only color-picker &&
cat .vscode-memory-leak-finder-results/event-listeners/editor.color-picker-toggle.json
@aiday-mar
Copy link
Contributor

Good catch, thanks a lot for the PR

@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 Dec 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants