[PR #13857] Attempt to fix the _refreshSizeUnderLock crash #29790

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

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

State: closed
Merged: Yes


See https://github.com/microsoft/terminal/issues/12176#issuecomment-1199488906, and MSFT:39723014.

I have literally no idea how to repro this one, or debug it. The dump I looked at looked like there was a SwapChainScaleChanged that was being dispatched as the app was tearing down. The ControlCore had started closing, but the TermControl hadn't yet. Apparently, just none of the _refreshSizeUnderLock callers checked if we were already closing.

All the callers appear to be on the main thread.

Closes #12176

Since there's no real way for me to repro this manually, I'm thinking we fire this fix off to the OS terminal build, where we'll pretty quickly be able to see if this fixed it or not.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13857 **State:** closed **Merged:** Yes --- See https://github.com/microsoft/terminal/issues/12176#issuecomment-1199488906, and MSFT:39723014. I have literally no idea how to repro this one, or debug it. The dump I looked at looked like there was a `SwapChainScaleChanged` that was being dispatched as the app was tearing down. The `ControlCore` had started closing, but the `TermControl` hadn't yet. Apparently, just none of the `_refreshSizeUnderLock` callers checked if we were already closing. All the callers appear to be on the main thread. Closes #12176 Since there's no real way for me to repro this manually, I'm thinking we fire this fix off to the OS terminal build, where we'll pretty quickly be able to see if this fixed it or not.
claunia added the pull-request label 2026-01-31 09:36:54 +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#29790