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

thread 'main' panicked at 'assertion failed: (left != right) while running example on Linux #47

Open
VictorRandall opened this issue Mar 13, 2022 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@VictorRandall
Copy link

I am on Linux Mint and i tried to run the example code, however i gave me an error saying:

thread 'main' panicked at 'assertion failed: `(left != right)`
  left: `-1`,
 right: `-1`', stick/src/raw/linux.rs:569:9

I also run with back trace and i gave me this:

stack backtrace:
   0: rust_begin_unwind
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:145:5
   4: stick::raw::ffi::Controller::new
             at ./stick/src/raw/linux.rs:569:9
   5: stick::raw::ffi::Listener::controller
             at ./stick/src/raw/linux.rs:748:30
   6: <stick::raw::ffi::Listener as stick::raw::Listener>::poll
             at ./stick/src/raw/linux.rs:765:21
   7: <stick::listener::Listener as core::future::future::Future>::poll
             at ./stick/src/listener.rs:45:9
   8: <pasts::race::Event<F,G,V,S,T,Z> as core::future::future::Future>::poll
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/race.rs:121:13
   9: <pasts::race::EventSlice<F,G,V,S,T,Z> as core::future::future::Future>::poll
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/race.rs:68:38
  10: <pasts::race::Loop<S,T,F> as core::future::future::Future>::poll
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/race.rs:202:41
  11: haptic::event_loop::{{closure}}
             at ./stick/examples/haptic.rs:62:21
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/mod.rs:80:19
  13: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/future/future.rs:119:9
  14: pasts::exec::Executor::block_on_pinned
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/exec.rs:79:54
  15: pasts::exec::Executor::block_on
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/exec.rs:100:9
  16: pasts::exec::block_on
             at /home/victorrandall/.cargo/registry/src/github.com-1ecc6299db9ec823/pasts-0.8.0/src/exec.rs:144:5
  17: haptic::main
             at ./stick/examples/haptic.rs:71:5
  18: core::ops::function::FnOnce::call_once
             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:227:5
@AldaronLau
Copy link
Member

@VictorRandall Thanks for opening this issue!

Noting that this has already being addressed in #38

@AldaronLau AldaronLau added duplicate This issue or pull request already exists bug Something isn't working labels Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants