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

Kill Terminal when only one terminal is open does not close the terminal panel #165067

Closed
joyceerhl opened this issue Oct 31, 2022 · 29 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending *not-reproducible Issue cannot be reproduced by VS Code Team member as described terminal-layout Issue relating to resizing, scroll bar position, terminal dimensions, etc.
Milestone

Comments

@joyceerhl
Copy link
Contributor

In the current stable, when there is only one terminal in the terminal area, clicking Kill Terminal (the trash icon) would also minimize the panel. This is no longer the case in the latest insiders:

Recording 2022-10-31 at 10 26 51

@meganrogge
Copy link
Contributor

meganrogge commented Oct 31, 2022

@joyceerhl anything else needed to repro this? does it always happen for you?

kill.mov

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues labels Oct 31, 2022
@meganrogge meganrogge added this to the November 2022 milestone Oct 31, 2022
@meganrogge meganrogge added the info-needed Issue requires more information from poster label Oct 31, 2022
@joyceerhl
Copy link
Contributor Author

Hm, if I start VS Code up with the panel visible, the first time it seems to close the panel as expected, then if I use ctrl+` to create a new terminal, on the second time onward it stops working.

terminal-maximize.mp4

I also see this error but unsure if it's related

this._core._renderService?._onIntersectionChange is not a function: TypeError: this._core._renderService?._onIntersectionChange is not a function
    at zi.forceUnpause (vscode-file://vscode-app/c:/Users/huer/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1971:27069)
    at Hi._resizeNow (vscode-file://vscode-app/c:/Users/huer/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:3121:3652)
    at Hi._resize (vscode-file://vscode-app/c:/Users/huer/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:3121:2736)
    at vscode-file://vscode-app/c:/Users/huer/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:6:42864

@meganrogge
Copy link
Contributor

oh that could certainly be related bc cannot repro and also not seeing that error on my computer. I have a PR to fix that error - will be interesting to see if you can repro tomorrow when that fix is in

@joyceerhl
Copy link
Contributor Author

I won't be able to check on reproing this till after our stable 1.73 goes out because insiders tracks the release branch during debt week

@meganrogge
Copy link
Contributor

@joyceerhl assuming it also reproduced in oss?

@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 1, 2022

I expect this to be fixed in #164899

@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 1, 2022
@Tyriar Tyriar removed this from the November 2022 milestone Dec 1, 2022
@joyceerhl
Copy link
Contributor Author

Still repros for me.

Latest stable:

Recording 2022-12-01 at 12 33 36

Latest insiders:
Recording 2022-12-01 at 12 32 13

@joyceerhl joyceerhl reopened this Dec 1, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 1, 2022

@joyceerhl I can't repro, any special steps/environment?

@meganrogge
Copy link
Contributor

Cannot reproduce either

@joyceerhl
Copy link
Contributor Author

Just Windows and Powershell. I can't repro if I disable all extensions, but extension bisect points to CPP Tools and I can still repro it after uninstalling CPP Tools so I doubt extension bisect is correct here. I do also see that the terminal initializes much faster if I have all extensions disabled. This seems flaky but eventually happens after killing the terminal a few times for me, could it be some kind of race condition?

@Tyriar
Copy link
Member

Tyriar commented Dec 2, 2022

Also reported at #163719

@Tyriar Tyriar added confirmation-pending and removed *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster confirmation-pending labels Dec 2, 2022
@meganrogge
Copy link
Contributor

cpp tools is also present in the extension list reported in #163719
Screenshot 2022-12-02 at 5 12 50 PM

@Tyriar
Copy link
Member

Tyriar commented Dec 5, 2022

I'd be surprised if an extension could influence this

@Tyriar Tyriar added this to the Backlog milestone Dec 5, 2022
@thw0rted
Copy link

thw0rted commented Apr 11, 2023

Have been experiencing this for a good couple of months now. I thought maybe I had misconfigured Git Bash (my default terminal) or something. It's good to hear other people have the same issue but looking back over this thread I don't really see a common denominator or any kind of workaround -- I just wind up clicking the "X" button on the terminal pane. It's annoying enough that I went looking for this issue; I'd sure like to at least have a way forward unless/until we figure out a root cause...

ETA: the "close pane" Command Palette option will close the orphaned Terminal pane, so that's something I guess.

@mistrate
Copy link

I'd be surprised if an extension could influence this

And you're right, I found the culprit to be https://github.com/gitkraken/vscode-gitlens. Uninstalling the extension fixes the issue, re-installing it brings the issue back

@thw0rted
Copy link

Good catch, do you think you could put together an issue for them? The only sort-of-related thing I could find is gitkraken/vscode-gitlens#2312 .

@meganrogge meganrogge added the *caused-by-extension Issue identified to be caused by an extension label May 22, 2023
@VSCodeTriageBot
Copy link
Collaborator

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2023
@Tyriar
Copy link
Member

Tyriar commented May 22, 2023

If an extension is to "blame" this issue is still our fault, the terminal panel should never show unless:

  1. There is an active terminal, or
  2. There is no terminal backend and the "welcome" message shows

@eamodio
Copy link
Contributor

eamodio commented May 22, 2023

@Tyriar FWIW, Given the steps in gitkraken/vscode-gitlens#2691, I can only imagine that it is something related to the TerminalLinkProvider -- since that is the only thing GL does with the terminal without the user actually executing a small number of Git commands.

@Tyriar
Copy link
Member

Tyriar commented May 24, 2023

@eamodio that would surprise me unless there are exceptions in the console as that could interrupt disposal are there any exceptions, do you see any when this repros?

@eamodio
Copy link
Contributor

eamodio commented May 25, 2023

I can't reproduce it.

@Tyriar
Copy link
Member

Tyriar commented May 25, 2023

Me neither 🤷

@Tyriar Tyriar closed this as completed May 25, 2023
@Tyriar Tyriar added the verified Verification succeeded label May 25, 2023
@Tyriar
Copy link
Member

Tyriar commented May 25, 2023

@joyceerhl let us know if you see something different

@thw0rted
Copy link

@Tyriar this still happens for me, reliably, every time. Is there some kind of debug output I can send to help you track it down? I agree that it should not be possible for an extension to break Code in this manner...

@Tyriar
Copy link
Member

Tyriar commented May 26, 2023

@thw0rted can you post your settings.json and list of extensions? You could try set log level to trace (via command palette) and then check the Output panel's "Window" log. Another place to check is whether any exceptions occur in the devtools console (Help > Toggle Developer Tools). Did you try with Insiders, or Stable?

@thw0rted
Copy link

Hey, sorry it took me so long to get back to this. I only run Stable release.

settings.json.txt

list of extensions

2023-05-31 10:30:29.242 [trace] KeybindingService#dispatch Ctrl+` workbench.action.terminal.toggleTerminal
2023-05-31 10:30:29.242 [trace] CommandService#executeCommand workbench.action.terminal.toggleTerminal
2023-05-31 10:30:29.253 [trace] terminalInstance#ctor (instanceId: 2) {"executable":"C:\\Program Files\\Git\\bin\\bash.exe","args":["--login"]}
2023-05-31 10:30:29.302 [trace] Webgl was loaded
2023-05-31 10:30:29.495 [debug] Terminal process ready (shellProcessId: 31456)
2023-05-31 10:30:29.506 [debug] terminalInstance added capability 3
2023-05-31 10:30:33.250 [debug] Terminal process exit (instanceId: 2) with code undefined
2023-05-31 10:30:33.250 [debug] Terminal process exit (instanceId: 2) state 6
2023-05-31 10:30:33.250 [trace] terminalInstance#dispose (instanceId: 2)
2023-05-31 10:30:36.099 [trace] CommandService#executeCommand workbench.action.closePanel
2023-05-31 10:30:38.764 [trace] KeybindingService#dispatch Ctrl+` workbench.action.terminal.toggleTerminal
2023-05-31 10:30:38.764 [trace] CommandService#executeCommand workbench.action.terminal.toggleTerminal
2023-05-31 10:30:38.795 [trace] terminalInstance#ctor (instanceId: 3) {"executable":"C:\\Program Files\\Git\\bin\\bash.exe","args":["--login"]}
2023-05-31 10:30:38.836 [trace] Webgl was loaded
2023-05-31 10:30:38.994 [debug] Terminal process ready (shellProcessId: 30052)
2023-05-31 10:30:39.001 [debug] terminalInstance added capability 3

That's the logs from opening a terminal with CTRL+backtick, exiting, closing the (now empty) bottom panel by clicking the "X" button, then opening a terminal (same kbd shortcut) again. Nothing jumps out at me.

@VSCodeTriageBot
Copy link
Collaborator

We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our issue reporting guidelines might help you with that.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2023
@mrroll
Copy link

mrroll commented Oct 23, 2023

I, too, am experiencing this. The only immediate thing for me is also having the GitLens extension.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending *not-reproducible Issue cannot be reproduced by VS Code Team member as described terminal-layout Issue relating to resizing, scroll bar position, terminal dimensions, etc.
Projects
None yet
Development

No branches or pull requests

8 participants