terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open sna-scourtney opened this issue 3 years ago • 2 comments

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 had just unlocked the screen after having it locked overnight. Normally I suspend the machine overnight, but I was working late so I just locked the screen instead.
  • The rest of Windows was basically idle other than a couple of web browser tabs sitting at non-interactive pages.
  • During the locked period, the CPU usage was high enough to spin the laptop's fans at near-max. That's why I was in Task Manager in the first place, to see what app or process was the culprit. In descending order of CPU usage history, they were: (1) MS Office (ironic, since I wasn't even using it); (2) MS My Phone (also ironic, since I have never used it whatsoever); (3) Windows Terminal.

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. :)

sna-scourtney avatar Apr 30 '21 15:04 sna-scourtney

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!

carlos-zamora avatar Feb 22 '23 23:02 carlos-zamora

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.

lhecker avatar Apr 12 '23 21:04 lhecker