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

Some client app closes randomly after idle (even with sleep disabled) #16888

Closed
colin-heberling opened this issue Mar 18, 2024 · 12 comments
Closed
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.

Comments

@colin-heberling
Copy link

Windows Terminal version

1.19.10573.0

Windows build number

10.0.19045.4046

Other Software

No response

Steps to reproduce

Don't know yet, sometimes it happens once every couple weeks, other times 2-3 times a week.

Expected Behavior

Terminal doesn't close or terminate unless I tell it to.

Actual Behavior

I have Terminal installed on 2 different desktop computers, one with Windows 10, the other with Windows 11.

  1. Sleep is disabled on both,
  2. power settings set to performance,
  3. advanced app settings set to 'always' for background permissions
  4. in advanced control panel settings for power options, made sure sleep and hibernate are set to never, 'put hard disk to sleep' set to never
  5. changed Terminal advanced profile options so that terminate behavior is set to 'never close automatically'

The error happens intermittently, and does not happen at the same time on both computers, suggesting that it is not related to Windows Store updates.

After applying change 5 listed above, Terminal doesn't close, but all sessions are still terminated with following error message:

[process exited with code 3221225786 (0xc000013a)] You can now close this terminal with Ctrl+D, or press Enter to restart.

Previous session processes are no longer running in background either.

@colin-heberling colin-heberling added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 18, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@zadjii-msft
Copy link
Member

What are you running as the command in your profiles/? The Terminal isn't crashing, so that's a good sign. But it seems like whatever client app you're running thinks it should be Ctrl+c'd?

Return value/code Description
0xC000013A
STATUS_CONTROL_C_EXIT
{Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 18, 2024
@zadjii-msft zadjii-msft changed the title Terminal closes randomly after idle (even with sleep disabled) Some client app closes randomly after idle (even with sleep disabled) Mar 18, 2024
@colin-heberling
Copy link
Author

I'm usually running Ubuntu profiles, and Windows Command Prompt profiles. I don't recall inputting CTRL+C at all within Terminal, unless I've accidentally tried to use CTRL+C for copying text instead of right-clicking highlighted text, but since the error usually happens when I unlock my idle computer, I don't think that's the issue.

But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Mar 18, 2024
@zadjii-msft
Copy link
Member

But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle.

That makes sense. Basically what's happening is that the client process is dying for some reason (it thinks due to a ctrl+c, even if that's not true), and when the client process exits, the tab would close, and when the last tab closes, the terminal would close. Simple enough.

Now, the trick here is what's causing these ctrl+c's? I wouldn't think that would be related to any power plan thing. Maybe some other process or service is sending that signal to all console apps? That would be weird, for sure. And if it's happening to multiple tabs all at the same time, then it's not happening due to a key stroke getting broadcast (since in that case, the key would only arrive at the active tab). Hmm. I don't even know how I'd go about debugging that...

@zadjii-msft
Copy link
Member

(and in retrospect, that STATUS_CONTROL_C_EXIT error is for a bunch of different possible control events, not necessarily just Ctrl+C.)

A TimeTravel trace would work, but you'd need a consistent repro to have a shot at capturing that.

I guess one thought is - does this happen to CMD tabs? Or just Ubuntu ones? Maybe there's a chance that just WSL updating?

(note to self: it isn't OpenConsole crashing, that's a 259 error)

Were these tabs opened by opening them directly in the Terminal? Or by opening Command Prompt / Ubuntu directly/?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Mar 20, 2024
@colin-heberling
Copy link
Author

This happens to my entire Terminal application, no matter which profiles I have in each tab. It's been a mixture of both Ubuntu and CMD, and I currently have it setup to open all Ubuntu and CMD instances into new tabs within my sole Terminal window. Previously before I setup that configuration if I had isolated windows for CMD, they wouldn't be affected by Terminal closing. I think isolated WSL windows were fine too, but I honestly can't remember.

So it seems to be a problem with Terminal itself, and the choice of profile or how they got there doesn't seem to matter.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Mar 20, 2024
@zadjii-msft
Copy link
Member

Weird. Well, we really don't know how exactly to debug this. But we're hoping we might be able to find some crash dumps that might be relevant. Filing feedback, and linking it here, should point us in the direction of your crashes (even if it doesn't capture the crash itself)

/feedback

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 27, 2024
@colin-heberling
Copy link
Author

Great, thank you. I haven't experienced this issue since I first opened this issue, so of course, due to the nature of the issue, I have no idea when it will occur again.

If and when it does occur again, what are the steps I should follow to file the feedback?

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 27, 2024
@ma-netint
Copy link

Hello,
Encountered the same issue as well. Had multiple windows with multiple tabs running when I locked/disconnected. On logging in from a remote desktop the terminals were closed. WSL was still running.
There was a pending windows update but issue date doesn't corelate with last modified date for the terminal in the Microsoft Store.
Running terminal version 1.19.105730.0. Windows 10 build 19045.4046.

In case the pending update is related how can I disable automatic updates for just the terminal?

@zadjii-msft
Copy link
Member

hey bot where are you

<bot hat>

Hi there!

Can you please send us feedback with the Feedback Hub with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?

Thanks!

image

image

image


In case the pending update is related how can I disable automatic updates for just the terminal

Pretty sure that's impossible in Windows 10. In a more recent Windows 11 build, we actually do opt ourselves out of auto-updates while we're running.

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Apr 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Apr 8, 2024
@colin-heberling
Copy link
Author

Fortunately I haven't had this issue reoccur again since I posted this issue. It's so sporadic that I'm not sure how I would record it. I'll post again if it happens again.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Apr 8, 2024
@carlos-zamora carlos-zamora removed the Needs-Attention The core contributors need to come back around and look at this ASAP. label Apr 10, 2024
@carlos-zamora carlos-zamora added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Apr 14, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity.
Projects
None yet
Development

No branches or pull requests

4 participants