microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.53k stars 8.17k forks source link

Task Manager "Switch To" from App History causes Terminal to respawn after exiting #10006

Open sna-scourtney opened 3 years ago

sna-scourtney commented 3 years ago

Windows Terminal version (or Windows build number)

Windows 10 Pro, 10.0.19042.928, Windows Terminal 1.7.1033.0

Other Software

Ubuntu 20.04 (stock kernel from Microsoft Store)

Steps to reproduce

  1. Run Windows Terminal with a single open bash session in Ubuntu 20.04
  2. Minimize this session
  3. Open Task Manager
  4. In Task Manager, go to the App History tab and find Windows Terminal
  5. Right-click on Windows Terminal and choose "Switch To" (this works as expected)
  6. From the bash session, type "exit" to close the WSL terminal shell

Expected Behavior

Windows Terminal should close until the next time its app icon is clicked (or it is otherwise intentionally started)

Actual Behavior

The terminal window closes as expected, but after a few seconds it spontaneously reopens at the same (or approximately the same) screen location.

This may be a very intermittent problem. I've been using Terminal extensively for about 3 weeks, but although the issue reproduces multiple times now, it has not occurred before.

I'm a programmer and know software doesn't "just break", so something has triggered this anomaly, but I have no idea what might be different. The shell in question is just an idle bash shell (non-root), and I'm not running any non-default daemons (like a database server) in the WSL environment.

Additional data about the current system status follows, but I have no idea if any of these might be related. I'm just capturing the raw data points while they are fresh in my memory.

I'm sorry for the vague report -- as a coder myself, I know this isn't going to be very useful, but at the moment this is all the data I have, and I thought it best to capture the incident early. I'll add this report to my watch list and append if I'm able to learn more.

As an aside, I'm a Linux sysadmin and not a Windows expert, so I'll be glad to run additional diags if someone can point me toward the appropriate tool. I'll gladly RTFM but have to know which "FM" to "R" first. :)

carlos-zamora commented 1 year ago

Verified this still occurs. Loaded it into the current milestone. Sorry for taking so long to get to this one! Thanks for being so patient!

lhecker commented 1 year ago

This is most likely an issue in the way Task Manager has implemented "Switch To" and is not something we can fix on our side unfortunately. We'll make sure the appropriate people will know about this.