[PR #1768] [MERGED] Stop crash on window snap by preventing torn device resources state #24656

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1768
Author: @miniksa
Created: 7/2/2019
Status: ✅ Merged
Merged: 7/2/2019
Merged by: @miniksa

Base: master ← Head: dev/miniksa/dx-resize-crash


📝 Commits (2)

  • 0709407 Stop crash on window snap by preventing torn device resources state when quick on-the-fly resizing operations happen. #1572
  • 915f223 fix code style

📊 Changes

1 file changed (+15 additions, -1 deletions)

View changed files

📝 src/renderer/dx/DxRenderer.cpp (+15 -1)

📄 Description

Summary of the Pull Request

Adjusts the logic inside the DX renderer's resize operations to not leave some device resources null and not others when a resize operation fails.

PR Checklist

Detailed Description of the Pull Request / Additional comments

You can see the verbose diagnostics that led to this conclusion in https://github.com/microsoft/terminal/issues/1572#issuecomment-507469309

This should resolve the crash, though it might not resolve the underlying issue of why the resizing is failing. But we should have more diagnostic information available when running under the debugger with the wil macros applied.

Validation Steps Performed

  • Ran the build with the patched and snapped it all over the place on my multiple monitors at varying speeds.
  • Turned on the 4k monitor and snapped to/from that one as well to see if a DPI transition gave it a problem.

🔄 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/1768 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 7/2/2019 **Status:** ✅ Merged **Merged:** 7/2/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/miniksa/dx-resize-crash` --- ### 📝 Commits (2) - [`0709407`](https://github.com/microsoft/terminal/commit/070940762f1fc264c9ada9579c943e8132aaf2d3) Stop crash on window snap by preventing torn device resources state when quick on-the-fly resizing operations happen. #1572 - [`915f223`](https://github.com/microsoft/terminal/commit/915f223dabb88dd57be4ec3701f9607d257e1151) fix code style ### 📊 Changes **1 file changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/DxRenderer.cpp` (+15 -1) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Adjusts the logic inside the DX renderer's resize operations to not leave some device resources null and not others when a resize operation fails. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1572 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [x] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments You can see the verbose diagnostics that led to this conclusion in https://github.com/microsoft/terminal/issues/1572#issuecomment-507469309 This should resolve the crash, though it might not resolve the underlying issue of why the resizing is failing. But we should have more diagnostic information available when running under the debugger with the wil macros applied. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Ran the build with the patched and snapped it all over the place on my multiple monitors at varying speeds. - Turned on the 4k monitor and snapped to/from that one as well to see if a DPI transition gave it a problem. --- <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:04:37 +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#24656