nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
https://docs.rs/xcap
Apache License 2.0
459 stars 55 forks source link

ReleaseDC failed #142

Open louis030195 opened 4 weeks ago

louis030195 commented 4 weeks ago

on a cloud VM on Azure

Screenshot 2024-08-18 at 09 14 14

image

code: https://github.com/louis030195/screen-pipe/blob/main/screenpipe-vision/src/capture_screenshot_by_window.rs

https://github.com/louis030195/screen-pipe/blob/ec637cdb05adb62490e027221d80918337f03115/screenpipe-vision/src/utils.rs#L154

related https://github.com/louis030195/screen-pipe/issues/181 https://github.com/nashaofu/xcap/issues/139

restarting the process usually solve the issue, seems non deterministic (same for the size error in #139)