-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Tabs are not released by TabSwitcher #8651
Labels
Area-UserInterface
Issues pertaining to the user interface of the Console or Terminal
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Product-Terminal
The new Windows Terminal.
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Severity-Blocking
We won't ship a release like this! No-siree.
Comments
ghost
added
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Needs-Tag-Fix
Doesn't match tag requirements
labels
Dec 24, 2020
@DHowett, @zadjii-msft - I am still trying to understand what is going on, but please consider this as potential release blocker. |
DHowett
added
Area-UserInterface
Issues pertaining to the user interface of the Console or Terminal
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Severity-Blocking
We won't ship a release like this! No-siree.
Product-Terminal
The new Windows Terminal.
and removed
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
labels
Dec 27, 2020
Good find! Thank you :) |
ghost
added
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
and removed
In-PR
This issue has a related PR
labels
Jan 4, 2021
ghost
pushed a commit
that referenced
this issue
Jan 4, 2021
Fix `TabPaletteItem` to hold only a weak reference to a tab. This way we guarantee that the refcount of the closed tab gets to 0 immediately (and that command palette cannot "raise it from the dead"). While this seems a correct thing to do, it is still not clear why the `FilteredCommand` itself (the one holding the `TabPaletteItem`) doesn't get released until the UI is refreshed. There is an impact of not registering to PropertyChanged event: if the tab title changes during Tab Switcher navigation the Tab Switcher item won't be updated immediately (the change will apply next time the Tab Switcher is open). Due to this change we need to make sure that the tabs binding in #8427 doesn't break the title / icon update. ## Validation Steps Performed * Manual testing Closes #8651
🎉This issue was addressed in #8653, which has now been successfully released as Handy links: |
mpela81
pushed a commit
to mpela81/terminal
that referenced
this issue
Jan 28, 2021
Fix `TabPaletteItem` to hold only a weak reference to a tab. This way we guarantee that the refcount of the closed tab gets to 0 immediately (and that command palette cannot "raise it from the dead"). While this seems a correct thing to do, it is still not clear why the `FilteredCommand` itself (the one holding the `TabPaletteItem`) doesn't get released until the UI is refreshed. There is an impact of not registering to PropertyChanged event: if the tab title changes during Tab Switcher navigation the Tab Switcher item won't be updated immediately (the change will apply next time the Tab Switcher is open). Due to this change we need to make sure that the tabs binding in microsoft#8427 doesn't break the title / icon update. ## Validation Steps Performed * Manual testing Closes microsoft#8651
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-UserInterface
Issues pertaining to the user interface of the Console or Terminal
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Product-Terminal
The new Windows Terminal.
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Severity-Blocking
We won't ship a release like this! No-siree.
Environment
Steps to reproduce
Expected behavior
Memory is back to normal
Actual behavior
Memory remains high until Command Palette (action mode) is open.
Same test without opening tab switcher returns memory usage back to normal.
Observations
TerminalTab
objects are still alive. Most probably due toCommandPalette
still holding a reference to them somehow (I believe this semi-leak exists in 1.5 or earlier, but became painful since introduction ofTabPaletteItem
, as now we hold a reference to a tab rather thanSwitchToTabCommand
)SetTabs
on the following invocations of TabSwitcher and yet it does not release the memoryx:Bind
not handlingPropertyChanged
ref-counting correctly (like here: Navigation Memory Leak microsoft-ui-xaml#934). But removing theINotifyPropertyChanged
completely and even converting the bindings toOneTime
didn't help. So now I am not sure if this is the right directionThe text was updated successfully, but these errors were encountered: