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

Deleting all profiles crashes Windows Terminal #13125

Closed
lhecker opened this issue May 18, 2022 · 5 comments · Fixed by #13242
Closed

Deleting all profiles crashes Windows Terminal #13125

lhecker opened this issue May 18, 2022 · 5 comments · Fixed by #13242
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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 Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Crash Crashes are real bad news.

Comments

@lhecker
Copy link
Member

lhecker commented May 18, 2022

Windows Terminal version

1.13.11373.0

Windows build number

No response

Other Software

No response

Steps to reproduce

  1. Delete all profiles

Expected Behavior

  • Shouldn't crash

Actual Behavior

  • Crash
@lhecker lhecker added Issue-Bug It either shouldn't be doing this or needs an investigation. Severity-Crash Crashes are real bad news. Priority-1 A description (P1) labels May 18, 2022
@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 May 18, 2022
@carlos-zamora
Copy link
Member

A few quick thoughts...

  1. this is probably relatively new behavior now that you're allowed to delete any profile (instead of just the custom ones, since we blocked deleting CMD before state.json got added)
  2. back in the JSON-only days, we would throw a warning/error and (I believe) fallback to the default settings
  3. Wouldn't this be a case of "play stupid games..."? 100% agree we shouldn't crash, but I feel like solution would be that we fallback to the default settings (like before) until you fix it, but then that might cause a weird state with the SUI. I'm just concerned we'd need major changes to fix a crash that presumably very few (if any) people are accidentally hitting.

@j4james
Copy link
Collaborator

j4james commented May 21, 2022

Is this perhaps the same thing as #13017?

@lhecker
Copy link
Member Author

lhecker commented May 21, 2022

No those are separate issues as far as I can tell. #13017 occurred when you saved your settings and you deleted a profile afterwards. Due to a bug in the UI code it crashed.

But I noticed that we also crash if you simply delete all profiles.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Area-Settings Issues related to settings and customizability, for console or terminal labels May 23, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 23, 2022
@zadjii-msft zadjii-msft added this to the Terminal v1.15 milestone May 23, 2022
@ghost ghost added the In-PR This issue has a related PR label Jun 7, 2022
@ghost ghost closed this as completed in #13242 Jun 8, 2022
@ghost ghost removed the In-PR This issue has a related PR label Jun 8, 2022
ghost pushed a commit that referenced this issue Jun 8, 2022
## Summary of the Pull Request
When a profile gets deleted, we were navigating to the next item assuming it was a profile when it may not be. This commit fixes this by checking the tag of the next menu item before we navigate to it. 

## PR Checklist
* [x] Closes #13125 
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

## Validation Steps Performed
Deleting the last profile in the SUI doesn't cause a crash
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Jun 8, 2022
DHowett pushed a commit that referenced this issue Jun 30, 2022
## Summary of the Pull Request
When a profile gets deleted, we were navigating to the next item assuming it was a profile when it may not be. This commit fixes this by checking the tag of the next menu item before we navigate to it.

## PR Checklist
* [x] Closes #13125
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

## Validation Steps Performed
Deleting the last profile in the SUI doesn't cause a crash

(cherry picked from commit 4e20a86)
Service-Card-Id: 82925050
Service-Version: 1.14
@ghost
Copy link

ghost commented Jul 6, 2022

🎉This issue was addressed in #13242, which has now been successfully released as Windows Terminal v1.14.186.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 6, 2022

🎉This issue was addressed in #13242, which has now been successfully released as Windows Terminal Preview v1.15.186.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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 Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants