-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Problems with session startup and resumption #16487
Comments
Can I contribute? |
Hmm. You wouldn't happen to be launching the Terminal as admin at any point in all this, would you? There's separate persisted state for each of those two instances, so that might be at play here/? Sounds like there's something weird going on with defterm here, since it's like the defterm launch is then also triggering another state restore? I'd reckon this may almost be related to #15509? Or maybe, more horrifyingly, there's an interplay here between defterm, session restore, and refrigeration. I coulda swore we had a better dupe somewhere for "a defterm session seemingly can't communicate with the existing WT process", but I can't find that. Just to confirm - do you only have one version of the Terminal installed? (e.g. only Stable, not also Preview) |
Not opening as admin, no. As far as I'm aware I only have a single version installed. I'm not too familiar with update process for Windows apps/Powershell though. Are there any commands you suggest I run to verify that the installations are as they should be? |
I need to go dedupe the set of
|
Seems like there's something up with the way Windows 10 restores the Terminal... we restore the session, but then a subsequent launch of the Terminal also tries to restore. Weird. Oh no, I can't repro this in a VM, least, not on 10.0.19041 & 1.19.2682.0 |
oh man I wonder if there's some other console app that's starting at boot, triggering defterm, which triggers a session restore. But then also the Terminal gets launched, and it simultaneously finds no one else booted, so it also session restores. Is there anything else suspicious in "Startup" in Task Manager? |
Details in #16732 make me think that this is less related to Start on Login and more related to defterm accidentally triggering a session restore. |
Note to self: Go look at #16598 (comment)
|
Windows Terminal version
1.18.3181.0
Windows build number
10.0.19045.0
Other Software
No response
Steps to reproduce
Default terminal application
is Windows Terminal,Launch on machine startup
is On,When terminal starts
is set to Open windows from a previous session, andNew instance behaviour
to Create a new window.Expected Behavior
My expectation would be that restoration of the previous session should apply only to the first Terminal instance (be it at machine startup or subsequently). Any further explicitly opened instances should open a tab with the default profile, whereas any instances opened to house an application that was launched explicitly should simply have a single tab for that application.
Actual Behavior
Initial startup is as expected (for the most part, see caveat below), however I'm seeing strange behaviour following that. With a single instance of Terminal open, if I attempt to launch any console application (
cmd.exe
,PS
, or a console program launched via Visual Studio debugger), that application will open in a new Terminal window as expected, but alongside it a further Terminal window will be opened populated with tabs based on the prior session (so to clarify, I end up with 3 windows: the original session, a duplication of it, and the opened application).Regarding above noted caveat. It's not clear exactly how Terminal decides/updates what constitutes the previous session, but it seems far too easy for what I want to be considered my previous session to get replaced. Perhaps it's just based on the last window to be closed down? I really need some way to mark my 'main' session so that I don't end up losing the layout as a result of having at some point opened a secondary session. In particular, the fact that a session resulting from a request to open
cmd.exe
or similar directly can end up overwriting my Terminal layout restoration seems wrong.The text was updated successfully, but these errors were encountered: