[PR #16364] Fixed crash when cloud shell provider timed out or was closed waiting for login #30902

Open
opened 2026-01-31 09:43:43 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16364

State: closed
Merged: Yes


Summary of the Pull Request

Cloud shell connection calls out to Azure to do a device code login. When the polling interval is exceeded or the tab is closed, the method doing the connection polling returns nullptr, and AzureConnection immediately tries to GetNamedString from it, causing a crash. This doesn't repro on Terminal Stable or Preview, suggesting it's pretty recent related to the update of this azureconnection.

This is just a proposed fix, not sure if you want to do more extensive changes to the affected class or not, so marking this as a draft.

References and Relevant Issues

  • N/A - encountered this while using the terminal myself

PR Checklist/Validation

Tested out a local dev build:

  • Terminal doesn't crash when cloudshell polling interval exceeded
  • Terminal doesn't crash when cloudshell tab closed while polling for Azure login
**Original Pull Request:** https://github.com/microsoft/terminal/pull/16364 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Cloud shell connection calls out to Azure to do a device code login. When the polling interval is exceeded or the tab is closed, the method doing the connection polling returns `nullptr`, and `AzureConnection` immediately tries to `GetNamedString` from it, causing a crash. This doesn't repro on Terminal Stable or Preview, suggesting it's pretty recent related to the update of this azureconnection. This is just a proposed fix, not sure if you want to do more extensive changes to the affected class or not, so marking this as a draft. ## References and Relevant Issues * N/A - encountered this while using the terminal myself ## PR Checklist/Validation Tested out a local dev build: - [x] Terminal doesn't crash when cloudshell polling interval exceeded - [x] Terminal doesn't crash when cloudshell tab closed while polling for Azure login
claunia added the pull-request label 2026-01-31 09:43:43 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30902