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).

Home Page:https://docs.rs/xcap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic in Window::all() while in mission control on MacOS

tpatterson opened this issue · comments

This panic happens consistently when trying to call Window::all() while the screen is in mission control (4-finger swipe up)

thread 'main' panicked at /Users/rex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.4/src/string.rs:28:1:
Attempted to create a NULL object.
stack backtrace:
   0: std::panicking::begin_panic
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:688:12
   1: <core_foundation::string::CFString as core_foundation::base::TCFType>::wrap_under_create_rule
             at /Users/rex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.4/src/lib.rs:110:17
   2: <T as core_foundation::base::FromVoid>::from_void
             at /Users/rex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.4/src/base.rs:358:31
   3: xcap::platform::impl_window::ImplWindow::new
             at /Users/rex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xcap-0.0.6/src/macos/impl_window.rs:89:17
   4: xcap::platform::impl_window::ImplWindow::all
             at /Users/rex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xcap-0.0.6/src/macos/impl_window.rs:179:35
   5: xcap::window::Window::all
image

fixed in #117

Fixed! Brilliant! and thank you very much. As promised I sponsored you again for this and those other things you fixed while you were at it.

Thank you again