[PR #13777] [MERGED] Fix a crash in _WritePseudoWindowCallback #29756

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13777
Author: @zadjii-msft
Created: 8/18/2022
Status: Merged
Merged: 8/19/2022
Merged by: @undefined

Base: mainHead: dev/migrie/b/msft-40853556


📝 Commits (1)

  • 9126302 Fixes a crash in _WritePseudoWindowCallback

📊 Changes

1 file changed (+14 additions, -2 deletions)

View changed files

📝 src/host/VtIo.cpp (+14 -2)

📄 Description

Fixes MSFT:40853556

There's a small race here. The renderer thread in ConPTY might notice the terminal is gone, call CloseOutput, and release the vt renderer, and then the window proc fires and decides to minimize/restore the window, triggering an A/V.

I'm 100% confident that this has NEVER happened to a real user. But the test labs hit it so much that it makes up ~26% of our crashes.

I haven't tested this cause again, it doesn't hit in the wild


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13777 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 8/18/2022 **Status:** ✅ Merged **Merged:** 8/19/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/msft-40853556` --- ### 📝 Commits (1) - [`9126302`](https://github.com/microsoft/terminal/commit/9126302eb267c0d7182ffe13969a27166060d8cb) Fixes a crash in `_WritePseudoWindowCallback` ### 📊 Changes **1 file changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/host/VtIo.cpp` (+14 -2) </details> ### 📄 Description Fixes MSFT:40853556 There's a small race here. The renderer thread in ConPTY might notice the terminal is gone, call CloseOutput, and release the vt renderer, and then the window proc fires and decides to minimize/restore the window, triggering an A/V. I'm 100% confident that this has NEVER happened to a real user. But the test labs hit it so much that it makes up ~26% of our crashes. I haven't tested this cause again, _it doesn't hit in the wild_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:36:44 +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#29756