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 due to DockPanelRenderer #13323

Closed
Tracked by #13192
Hanksha opened this issue Jan 26, 2024 · 0 comments · Fixed by #13327
Closed
Tracked by #13192

Memory leak due to DockPanelRenderer #13323

Hanksha opened this issue Jan 26, 2024 · 0 comments · Fixed by #13327
Milestone

Comments

@Hanksha
Copy link
Contributor

Hanksha commented Jan 26, 2024

Bug Description:

The DockPanelRenderer in application-shell.ts listens to core preferences when creating a tab bar but never disposes of the listener (see here). The ToolBarAwareTabBar that it creates also never disposes of the TabBarToolrar. This leads to memory leak warnings when the user opens and closes a lot of tabs.

Steps to Reproduce:

  1. Open a file so it opens a tab.
  2. Close the file editor tab (there should be no tabs left open in the main editor area).
  3. Do that a good 200 hundred times (ideally via a playwright test)
  4. Check the logs, you'll see memory leak warnings related to listeners.

Example warning logs:

2024-01-26T13:37:10.345Z root WARN Possible Emitter memory leak detected. 176 listeners added. Use event.maxListeners to increase the limit (175). MOST frequent listener (1):
2024-01-26T13:37:10.345Z root WARN     at _event.Object.assign.maxListeners [as onDidChange] (http://localhost:3000/bundle.js:66811:54)    
    at TabBarToolbar.init (http://localhost:3000/bundle.js:53084:52)
    at _postConstruct (http://localhost:3000/bundle.js:95512:95)
    at _getInstanceAfterPostConstruct (http://localhost:3000/bundle.js:95499:31)
    at resolveInstance (http://localhost:3000/bundle.js:95544:16)
    at _getResolvedFromBinding (http://localhost:3000/bundle.js:95657:85)
    at http://localhost:3000/bundle.js:95675:22
    at _resolveInScope (http://localhost:3000/bundle.js:95669:14)

Additional Information

  • Operating System: Windows/Linux
  • Theia Version: 1.43.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants