Open floppyhammer opened 1 year ago
There's no routine to easily reproduce it. It happens occasionally when I use some command line tools (like npm) that will invoke another terminal/cmd console.
I don't think anyone on the team has encountered this before. Are there some steps we could follow to attempt to reproduce it? (For instance if you list the tools and commands that cause the issue for you.)
I happened to hit this bug many times. The strange terminal window (without any tabs on it) is invoked with -Embedding
arg in the background by something, not sure what but ~I've a feeling~ (I've lost the feeling 😄) that it's VS.
More Info:
It seems to be invoked by ~wininit.exe
~ svchost.exe
?
This is quite funny, but we have a repro right in our test suite 😂 (So I was correct, VS was related in this, maybe indirectly)
video demo: https://youtu.be/lNJOSjXioOY
My theory is that if the client application exits fast enough, we start a defterm window, but we never get it to the point of making an actual tab.
I see this sometimes (but usually only when I have a horribly busted defterm install).
I wonder if this repros after the process model changes in 1.18 EDIT: #16234 would imply that yes, this repros on 1.18
My repro case:
npm run dev
to start a server.ctrl+c
once, and no need to confirm the ensued prompt Terminate batch job (Y/N)?
.I can also reproduce with:
.cmd
file on logon. For me it looks even more odd, as the windows don't even have a fill:
@DanielHabenicht I suppose you're Win10, and the fill we can see in other repros is Mica which isn't available on Win10. Therefore, no fill? 🤔
Yes, I am on windows 10. You can see the version in the issue linked above.
Here is another repro. Steps inside: https://github.com/microsoft/terminal/issues/16281
I noticed that sometimes when this happens, in addition to Windows Terminal launching without a tab (the reported bug) it does also start the classic shell that then runs the actual PowerShell command/script.
Edit: By the way, this is the script I'm running.
Start-Sleep 1 # Try to work around https://github.com/microsoft/terminal/issues/15936
if((Test-Path "C:\code") -and $env:OneDriveCommercial -and (Test-Path $env:OneDriveCommercial)) {
# With monitoring
# robocopy "C:\code" (Join-Path $env:OneDriveCommercial code_backup) /MIR /TIMFIX /MON:1 /MOT:1 /DCOPY:DAT /XD venv .venv node_modules __pycache__ /NFL /NDL /R:10 /W:1
# Without monitoring
$p = Start-Process robocopy -ArgumentList "C:\code `"$(Join-Path $env:OneDriveCommercial code_backup)`" /MIR /TIMFIX /DCOPY:DAT /XD venv .venv node_modules __pycache__ /NFL /NDL /R:10 /W:1" -NoNewWindow -Wait -PassThru
Start-Sleep 1 # Try to work around https://github.com/microsoft/terminal/issues/15936
exit $p.ExitCode
} else {
Start-Sleep 1 # Try to work around https://github.com/microsoft/terminal/issues/15936
exit 1
}
Hi, are there any updates on this?
I'm investigating this currently. I could have swore I used to have a minimal repro for this, but I'm having a hard time currently 😕
If someone who's seeing this consistently could Capture a Debug ETL Trace and share it here, that would help immensely. I'm guessing there's one of two things going on:
Microsoft.Windows.Console.Host
providerSrvInit_PrepareToCreateDelegationTerminal
SrvInit_CreatedDelegationTerminal
SrvInit_DelegateToTerminalSucceeded
, nor a ReceiveTerminalHandoff_Failed
(this would be logged to Microsoft.Windows.Terminal.Connection
)ReceiveTerminalHandoff_Failed
If we for whatever reason see a ReceiveTerminalHandoff_Success
, then that would be surprising to me.
Leonard: if you use the debug version, set a breakpoint during handoff, or just put a Sleep(10000) on the Terminal side, then the conhost will fail out and the close events will fire before the close events get set up
Hi, I think I'm facing a similar issue and was able to reproduce it consistently. Not sure if it's related to this bug specifically, but I hope it helps somehow. For the purposes here, I am using Terminal v1.21.2361.0.
*In my case, I initially used the command wt pwsh -wd "C:\Users" -c {Write-Host "test";}
but since I was not sure if this was a PowerShell issue or Terminal issue, I also tested the command wt ping github.com
and it worked as well.
Several observations:
Windows Terminal version
1.17.12191.0
Windows build number
25941.1000
Other Software
No response
Steps to reproduce
There's no routine to easily reproduce it. It happens occasionally when I use some command line tools (like npm) that will invoke another terminal/cmd console. When the process is done, the invoked terminal will not close successfully (only the tab is closed, which results in an empty terminal with no tab), and you are unable to close it manually (because there's no tab).
Expected Behavior
A terminal losing any tabs should not exist.
Actual Behavior