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

[BUG] Light On Off Example Crashing [M1][no_std] #60

Closed
newcomertv opened this issue Jun 30, 2023 · 2 comments
Closed

[BUG] Light On Off Example Crashing [M1][no_std] #60

newcomertv opened this issue Jun 30, 2023 · 2 comments

Comments

@newcomertv
Copy link

Branch : no_std
Platform : Darwin arm64 (M1 Mac Book Pro)

When trying to run the example on M1 Mac I get the following error.
I might have time to investigate this later in the meantime I'm leaving this here:

matter-rs % bash -c "RUST_BACKTRACE=1 cargo run --example onoff_light"
warning: Patch `polling v2.2.0 (https://github.com/esp-rs-compat/polling#0a016089)` was not used in the crate graph.
Patch `smol v1.2.5 (https://github.com/esp-rs-compat/smol#15918c3c)` was not used in the crate graph.
Patch `socket2 v0.4.5 (https://github.com/esp-rs-compat/socket2#afeb7231)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
    Finished dev [optimized + debuginfo] target(s) in 0.26s
     Running `target/debug/examples/onoff_light`
[2023-06-30T07:59:59Z INFO  onoff_light] Matter memory: mDNS=320, Matter=12080, Transport=39736
[2023-06-30T07:59:59Z INFO  onoff_light] Will use network interface en0 with 10.5.221.91/fe80::1ca2:f0c3:35b1:2a5d for mDNS
[2023-06-30T07:59:59Z INFO  onoff_light] Persisting from/to /var/folders/zf/jdpvrr2n04v_pgcx1_hjkn300000gn/T/matter-iot
[2023-06-30T07:59:59Z INFO  matter::transport::core] Starting Matter transport
[2023-06-30T07:59:59Z INFO  matter::pairing::code] Pairing Code: 0087-6800-071
[2023-06-30T07:59:59Z INFO  matter::pairing::qr] QR Code: MT:Y.K90Q1212Z6Q66D33P084L90Z.I332SQ43I15T0
[2023-06-30T07:59:59Z INFO  matter::pairing::qr] 
    █████████████████████████████████████
    █████████████████████████████████████
    ████ ▄▄▄▄▄ █▀██ █▀▀▄ █  ▄█ ▄▄▄▄▄ ████
    ████ █   █ █ ▀█▀▄▄█▄▀▄ ▄▄█ █   █ ████
    ████ █▄▄▄█ ██▄ █ ██ ▄ ▀▀▀█ █▄▄▄█ ████
    ████▄▄▄▄▄▄▄█ █▄█ █ ▀ █ █ █▄▄▄▄▄▄▄████
    ████▄▀▀▀▀▀▄█▄▀█ █▀██ ▀ ██▄ ▀▀ ▄ ▀████
    ████▀█  ▀▀▄ ▄▄▀▄▄ ▄▄▄█▀█▄██▄ ▄▀▀▄████
    ████▀ ▀ █▄▄▀▄▀▀█ ▄█▄ ▀ ▀█ ██   ▀▀████
    ████ █  █▀▄█  ▄▀▀██▀█▀█ ▀▄ ▀ ██ ▄████
    ████▀▄▄█▄ ▄ ▀ ▀ ▄▀▀█▄▀█▀▄▄▀▄▄▀ ▀ ████
    ████ ▄▀█▄█▄ ▄█▀▄█▀█▄█▄▄▄█▄█  ▄  ▀████
    ████▄█▄██▄▄█▀▀   █ ▄█▀█▄ ▄▄▄ ▄▀▀▄████
    ████ ▄▄▄▄▄ ██▀█ ▄█▀▀▀▀ ▀ █▄█ ▄▄ ▄████
    ████ █   █ ██ ▀█▄▄ █▄▀██▄▄▄ ▄▄ ▀▄████
    ████ █▄▄▄█ ██ ▀▀ ▄█▄▀▄▀█▀▄▀ ▀  ▄█████
    ████▄▄▄▄▄▄▄█▄█████▄▄██▄▄█▄██▄█▄▄█████
    █████████████████████████████████████
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[2023-06-30T07:59:59Z INFO  matter::transport::core] Comissioning started
[2023-06-30T07:59:59Z INFO  matter::transport::udp::smol_udp] Listening on [::]:5540
Error: Error::StdIoError {
   0: std::backtrace::Backtrace::create
   1: matter::error::Error::new
             at ./matter/src/error.rs:93:24
   2: <matter::error::Error as core::convert::From<std::io::error::Error>>::from
             at ./matter/src/error.rs:141:9
   3: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/result.rs:2002:27
   4: matter::transport::udp::smol_udp::UdpListener::new::{{closure}}
             at ./matter/src/transport/udp.rs:39:25
   5: matter::mdns::builtin::MdnsRunner::run_udp::{{closure}}
             at ./matter/src/mdns/builtin.rs:124:76
   6: onoff_light::run::{{closure}}
             at ./matter/../examples/onoff_light/src/main.rs:223:63
   7: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/future/future.rs:125:9
   8: <&mut F as core::future::future::Future>::poll
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/future/future.rs:113:9
   9: <embassy_futures::select::Select<A,B> as core::future::future::Future>::poll
             at /Users/nikolasvonlonski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embassy-futures-0.1.0/src/select.rs:55:33
  10: onoff_light::run::{{closure}}
             at ./matter/../examples/onoff_light/src/main.rs:225:71
  11: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/future/future.rs:125:9
  12: <&mut F as core::future::future::Future>::poll
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/future/future.rs:113:9
  13: async_io::driver::block_on
             at /Users/nikolasvonlonski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-io-1.12.0/src/driver.rs:146:33
  14: onoff_light::run
             at ./matter/../examples/onoff_light/src/main.rs:228:5
  15: core::ops::function::FnOnce::call_once
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/ops/function.rs:250:5
  16: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/sys_common/backtrace.rs:134:18
  17: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/thread/mod.rs:526:17
  18: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/panic/unwind_safe.rs:271:9
  19: std::panicking::try::do_call
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/panicking.rs:485:40
  20: std::panicking::try
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/panicking.rs:449:19
  21: std::panic::catch_unwind
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/panic.rs:140:14
  22: std::thread::Builder::spawn_unchecked_::{{closure}}
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/std/src/thread/mod.rs:525:30
  23: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /private/tmp/rust-20230613-7622-103lepv/rustc-1.70.0-src/library/core/src/ops/function.rs:250:5
  24: std::sys::unix::thread::Thread::new::thread_start
  25: __pthread_joiner_wake
}
ivmarkov added a commit to ivmarkov/rs-matter that referenced this issue Jun 30, 2023
ivmarkov added a commit to ivmarkov/rs-matter that referenced this issue Jun 30, 2023
ivmarkov added a commit to ivmarkov/rs-matter that referenced this issue Jun 30, 2023
@ivmarkov
Copy link
Contributor

ivmarkov commented Jun 30, 2023

Fixed in #61 and #62 .
While this get merged, perhaps you can just clone my repo and use the no_std branch from there.

Please also do cargo update once before cargo run --example onoff_light. It seems the repo contains an outdated Cargo.lock file. I'll fix that separately (by removing the .lock file from the repo, that is).

kedars added a commit that referenced this issue Jul 1, 2023
kedars added a commit that referenced this issue Jul 1, 2023
@newcomertv
Copy link
Author

Perfect that worked for me!

I'm closing this issue

ivmarkov added a commit to ivmarkov/rs-matter that referenced this issue Jul 21, 2023
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

2 participants