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

Crash on startup #10273

Closed
evakili opened this issue May 29, 2021 · 2 comments
Closed

Crash on startup #10273

evakili opened this issue May 29, 2021 · 2 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@evakili
Copy link

evakili commented May 29, 2021

Windows Terminal version (or Windows build number)

1.8.210524004

Other Software

No response

Steps to reproduce

I know there are other issues about crashing at startup, but I could not find any similar one to my issue.

I install the Windows terminal via scoop.

After upgrading from 1.7 to 1,8, when I open the terminal it immediately closed. After playing around I found that some of the profiles open without problem (opening from taskbar menu), while some other profiles are crashed at startup. Finally, I found every PowerShell profile that I set its startingDirectory to ~ will face the crash. After changing ~ to %USERPROFILE% (as the settings editor suggested) the problem is solved.

Expected Behavior

The ~ as startingDirectory is worked fine in the older versions (1.7-).

Actual Behavior

It crashed at startup.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 29, 2021
@zadjii-msft
Copy link
Member

Root cause: In #10045, we thought it was a good idea to stop validating your startingDirectory's before spawning processes. In prior releases, we'd check that path exists, and fall back to %USERPROFILE% if it didn't. Turns out, WSL can take a excessive amount of time to report if a path exists or not.
As it also turns out, more people were relying on that silent fallback to %USERPROFILE% than we were expecting.

Now, if you've got "closeOnExit": "always" in your settings, the Terminal will close instantly when it determines that it couldn't launch your commandline in the given startingDirectory.

Mitigation

  • Change closeOnExit to "closeOnExit": "graceful".
  • Update the startingDirectory of your profile to an actual Windows path. Remember, it MUST be a Windows path, even for WSL profiles. ~ is not a Windows path, even if PowerShell uses it as a shorthand for %USERPROFILE%. WSL paths will need to use the //wsl$/{distro}/home/{wsl username} format.

@ghost
Copy link

ghost commented Jun 1, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jun 1, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 1, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants