[PR #10357] Lock for writing in ControlCore::SetBackgroundOpacity #28002

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

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

State: closed
Merged: Yes


PR Checklist

  • Closes random crash that @lhecker sent me on Teams
  • I work here.

Detailed Description of the Pull Request / Additional comments

  • Any change to the renderer engine has to be done under lock. Leonard gave me a crash where the dirty rectangles changed out from under the renderer thread. By inspection, only one spot in ControlCore is modifying the engine outside of lock.... here. The dump is too far along to definitively prove the issue and it's sort of a race so its difficult to repro. But the theory is sound that all writes to the dirty regions must be done under lock. So here's a fix.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/10357 **State:** closed **Merged:** Yes --- ## PR Checklist * [x] Closes random crash that @lhecker sent me on Teams * [x] I work here. ## Detailed Description of the Pull Request / Additional comments - Any change to the renderer engine has to be done under lock. Leonard gave me a crash where the dirty rectangles changed out from under the renderer thread. By inspection, only one spot in `ControlCore` is modifying the engine outside of lock.... here. The dump is too far along to definitively prove the issue and it's sort of a race so its difficult to repro. But the theory is sound that all writes to the dirty regions must be done under lock. So here's a fix.
claunia added the pull-request label 2026-01-31 09:25:40 +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#28002