Cap icon indicating copy to clipboard operation
Cap copied to clipboard

fix: Handle C++ exceptions during capture item creation in Windows thumbnails

Open seer-by-sentry[bot] opened this issue 1 month ago • 1 comments

Fixes CAP-DESKTOP-T7. The issue was that: Race condition between window enumeration and CreateForWindow causes Windows Graphics Capture API to throw an unhandled C++ exception on invalid HWND.

  • Wrap try_as_capture_item calls in catch_unwind to handle C++ exceptions that can occur if the display or window is disconnected or destroyed between enumeration and capture.
  • This prevents crashes in the thumbnail generation process.

This fix was generated by Seer in Sentry, triggered by Richie. 👁️ Run ID: 2575840

Not quite right? Click here to continue debugging with Seer.

seer-by-sentry[bot] avatar Nov 11 '25 12:11 seer-by-sentry[bot]

[!IMPORTANT]

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 11 '25 12:11 coderabbitai[bot]