Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0063]: missing field excluded_windows in initializer of Options #8

Open
Vaisakhkm2625 opened this issue Nov 9, 2024 · 2 comments

Comments

@Vaisakhkm2625
Copy link

First of all, thanks for making this program..
I couldn't get it run though, i am looking forward to trying it out..

i was looking for this for long time and i also unsuccessfully tried build my own with opencv...

hello

The Issue

I was trying to build a nix flake package to try out app on my machine.. (https://github.com/Vaisakhkm2625/swiftmouse/blob/nixflakes/flake.nix took like 5-6 hours )

But while building, i am getting this error..

swiftmouse on  main [!+?] is 📦 v0.1.0 via 🦀 via ❄️  impure (nix-shell-env) took 20s 
❮ cargo run --bin daemon
.
.
error[E0063]: missing field `excluded_windows` in initializer of `Options`
   --> /home/vaisakh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scap-0.0.5/src/capturer/engine/linux/mod.rs:338:23
    |
338 |         let options = Options {
    |                       ^^^^^^^ missing `excluded_windows`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `scap` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

i don't know much rust, but i figured just need to add excluded_windows option, but it's already there...

excluded_windows: None,

and as it's a issue with a dependency, i am not sure what to do, can you please help?

@Vaisakhkm2625
Copy link
Author

Infact, itseems they resolved it...

CapSoftware/scap#108

just need to update scap package to 0.0.6 version and remove excluded_windows and source_rect options

@Vaisakhkm2625
Copy link
Author

i got it to complie.. but..

swiftmouse/target/debug on  nixflakes [!?] via ❄️  impure (nix-shell-env) took 7s 
❯ ./daemon
[Global Shortcuts] Listening on D-Bus
[Main] Waiting for events
Taking screenshot using pipewire
Capturer stopped, starting: 19.5µs
[Watchdog] No capturer found
Capturer started in 103.282µs
Capturer started: 127.156µs
Capturer found: 2.522µs
[PipewireCapturer] Elapsed lock: 1.901µs
[PipewireCapturer] Elapsed rx: 1.001698663s
[PipewireCapturer] Timeout
[Screenshot Tool] Failed to take screenshot using pipewire: Error
[Screenshot Tool] Failed to take screenshot using pipewire, falling back to screenshot portal
[PipewireCapturer] Cleanup job started
[Scoeeenshot] Screenshot taken: file:///run/user/1000/hypr/xdph_screenshot_5aaa7514.png
[Screencapture Thread] Starting capture
[Screencapture Thread] Capture started
thread '<unnamed>' panicked at library/core/src/panicking.rs:221:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
zsh: abort (core dumped)  ./daemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant