[PR #17193] AtlasEngine: Fix several error handling bugs #31151

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

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

State: closed
Merged: Yes


This fixes:

  • HRESULTs not being shown as unsigned hex
  • D2DERR_RECREATE_TARGET not being handled
  • 4 calls not checking their HRESULT return
    Out of the 4 only CreateCompatibleRenderTarget will throw in
    practice, however it throws D2DERR_RECREATE_TARGET which is common.
    Without this error handling, AtlasEngine may crash.

Validation Steps Performed

  • Set Graphics API to Direct2D
  • Use DXGIAdapterRemovalSupportTest.exe to trigger
    D2DERR_RECREATE_TARGET
  • No error message is shown
  • If the D2DERR_RECREATE_TARGET handling is removed, the application
    never crashes due to cursorRenderTarget being nullptr
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17193 **State:** closed **Merged:** Yes --- This fixes: * `HRESULT`s not being shown as unsigned hex * `D2DERR_RECREATE_TARGET` not being handled * 4 calls not checking their `HRESULT` return Out of the 4 only `CreateCompatibleRenderTarget` will throw in practice, however it throws `D2DERR_RECREATE_TARGET` which is common. Without this error handling, AtlasEngine may crash. ## Validation Steps Performed * Set Graphics API to Direct2D * Use `DXGIAdapterRemovalSupportTest.exe` to trigger `D2DERR_RECREATE_TARGET` * No error message is shown ✅ * If the `D2DERR_RECREATE_TARGET` handling is removed, the application never crashes due to `cursorRenderTarget` being `nullptr` ✅
claunia added the pull-request label 2026-01-31 09:45:26 +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#31151