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

MEGATHREAD: Crashes in 1.8.1444 and 1.9.1445 #10305

Closed
zadjii-msft opened this issue Jun 1, 2021 · 14 comments
Closed

MEGATHREAD: Crashes in 1.8.1444 and 1.9.1445 #10305

zadjii-msft opened this issue Jun 1, 2021 · 14 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Milestone

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented Jun 1, 2021

Hey all,

We've been seeing an enormous amount of crashes in the initial 1.8 and 1.9 releases - far more than usual. Hopefully this thread will try and clear up some of the root causes, and provide workarounds while we're working on shipping the hotfix release.

This thread is a work-in-progress as we track the latest state of these crashes.

Crashes on launch

Root cause: There are two possible root causes here. They are fundamentally caused by the MSIX update leaving our package in a torn state, see #10243.

Mitigation

  • If you've set the Terminal as the Default Terminal application, revert that setting to the vintage Console Host. You can do this by clearing the registry entries in HKCU\Console\%%Startup.
  • First try "Repairing" the Terminal app, by going to "Settings > Apps > {whatever Terminal Install you have} > Advanced Options > Repair". This shouldn't delete your settings. (But "Reset" will, so be careful!)
  • If that doesn't work, try adding "fontFace": "Consolas" to your defaults under profiles in your settings.json file.

Window appears briefly, then closes immediately

READ: This might also just look like a crash! "Appears briefly" might just look like "closes instantaneously"

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.

Crashes when opening SUI

If you click on the "Settings" entry in the Terminal, and it crashes, this is the section for you.

Root cause: Some of the "default terminal emulator" code checks which packages are available to set as the default terminal. When it can't find any, it returns a default entry of just the vintage console host (which will always exist). We'll do this even the defterm setting isn't enabled on your build of Windows. Turns out that the API to get that list of packages doesn't entirely work right on older versions of Windows, so we'd fail early, and not even return conhost.

Mitigation

  • Don't click on "Settings"
  • Use the settings.json file to edit your settings temporarily.

Something else?

Seeing a crash that doesn't look like the above? Make sure to search for open issues that sound like what you're seeing, then feel free to open a new one.

  • A dump would be the MOST useful thing you could possibly add to your report.
  • Baring that, a stack trace would be just about as helpful.
  • At the very least, we're going to need a Feedback Hub trace of the crash, and a link to the feedback, so we can look it up in the backend.

Issues without any of the above will likely get closed with prejudice, as we're trying to deal with an exceptionally more active backlog this week. Thanks!

@zadjii-msft zadjii-msft added Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. Priority-0 Bugs that we consider release-blocking/recall-class (P0) labels Jun 1, 2021
@zadjii-msft zadjii-msft added this to the Terminal v1.9 milestone Jun 1, 2021
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 1, 2021
@zadjii-msft zadjii-msft pinned this issue Jun 1, 2021
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 1, 2021
@Chris-Johnston
Copy link
Member

Chris-Johnston commented Jun 1, 2021

Thanks for this post! On 1.8.1444.0 I had a similar issue and mitigation: my default profile used the consolas font, and so wt would load fine, but one of my profiles would crash the whole window. This profile was using Cascadia Mono.
The mitigation was to change this profile's font face back to consolas, now it works fine (just without the nice font).

Would be happy to share logs/stack trace if it would help, seems to repro consistently. Edit: Once I launched into the crashing profile with the consolas font, I changed my config back to Cascadia Mono. The font loaded just fine, and now I can't repro. Good, I guess?

@aaaronic
Copy link

aaaronic commented Jun 2, 2021

+1 Repairing my install fixed the issue for me. (v1.8.1444.0)

@jayjlow
Copy link

jayjlow commented Jun 2, 2021

I having an issue with opening additional terminals. WSL terminal and 2 ssh terminals. Crashed on load. I repaired the install through "Windows Terminal App Settings". Fixed issue. (1.8.1444.0)

@SpitFire-666
Copy link

Apologies, are there instructions on how to create/retrieve a dump/trace/feedback hub trace?

I'm seeing regular crashes but they fall into the "Something Else" category. Cheers

@hameno
Copy link

hameno commented Jun 3, 2021

#10302 seems related, got a lot of crashes due to this

@DHowett
Copy link
Member

DHowett commented Jun 3, 2021

ALL: 1.8.152 and 1.9.152 are rolling out through the store with some very pointed crash fixes for the common cases we've observed. We are hitting a huge issue in the MSIX distribution platform that messes up files in our package, but the changes we implemented in #10260 and #10238 should make this much more pleasant.

If you continue to have issues, please please please keep filing feedback. It's so helpful because it's also the currency we can use to get other teams to fix their crap. 😄

@campbellkerr Sure, thanks for sticking with us! If you submit a feedback hub entry in the "Apps > Windows Terminal" category, then cause the crash while it is "Recording", then share the feedback link with us we'll get all the diagnostic info we can 😄

@hameno We're looking at that one; thanks for surfacing it!

@hameno
Copy link

hameno commented Jun 3, 2021

@DHowett I've started using the preview version (1.9) today and haven't had any crashes during my work day. Maybe it's already fixed in 1.9 - I'll keep monitoring

@DHowett
Copy link
Member

DHowett commented Jun 3, 2021

@campbellkerr If you're more inclined to capture traces and dumps locally, grab the src\Terminal.wprp document from our repo, run it using Windows Performance Recorder, and then send us the ETL document or look at it locally. The feedback hub node for "Windows Terminal" almost literally uses that file plus collects dumps.

@SpitFire-666
Copy link

@DHowett I managed to record an ETL of it crashing (let me know if you want me to create a new issue?). ETL is here:
https://1drv.ms/u/s!AlE-uu5DK9rJgc4tQuZ-qfRxNKyrzA?e=WBlxI3

I don't have Feedback Hub on this PC (work laptop)

@zadjii-msft zadjii-msft unpinned this issue Jul 12, 2021
@olegtk
Copy link
Member

olegtk commented Oct 13, 2021

Was there another update of Windows Terminal around 10/5/2021? We are seeing large volume of feedback tickets about Visual Studio not able to use Cascadia font since 10/5.

@zadjii-msft
Copy link
Member Author

image

Yep

@olegtk
Copy link
Member

olegtk commented Oct 13, 2021

I see. Does Windows Terminal still update Cascadia.ttf?

@DHowett
Copy link
Member

DHowett commented Oct 13, 2021

Terminal still contains Cascadia.ttf, but it does not update it. We have an internal thread going on this -- we should converge there 😄

@olegtk
Copy link
Member

olegtk commented Oct 13, 2021

never mind then 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

8 participants