[PR #13832] Fix two race conditions around pseudo window visibility #29784

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

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

State: closed
Merged: Yes


This commit fixes two race conditions:

  • SetPseudoWindowCallback set the _pseudoWindowMessageCallback
    callback after the Win32 message thread was already spawned.
    This issue was fixed by instead using the ServiceLocator to get
    a hold of the global VtIo instance which is created statically.
  • XtermEngine::SetWindowVisibility was called without holding the
    console lock. This issue was fixed by simply acquiring it first.

Closes MSFT:40913882

Validation Steps Performed

  • Add IsConsoleLocked() assertion in VtEngine::_Write
  • Run Windows Terminal
  • No assertion failures
**Original Pull Request:** https://github.com/microsoft/terminal/pull/13832 **State:** closed **Merged:** Yes --- This commit fixes two race conditions: * `SetPseudoWindowCallback` set the `_pseudoWindowMessageCallback` callback after the Win32 message thread was already spawned. This issue was fixed by instead using the `ServiceLocator` to get a hold of the global `VtIo` instance which is created statically. * `XtermEngine::SetWindowVisibility` was called without holding the console lock. This issue was fixed by simply acquiring it first. Closes MSFT:40913882 ## Validation Steps Performed * Add `IsConsoleLocked()` assertion in `VtEngine::_Write` * Run Windows Terminal * No assertion failures ✅
claunia added the pull-request label 2026-01-31 09:36:51 +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#29784