birkenfeld / ads-rs

Rust crate to access PLCs via the Beckhoff ADS protocol
https://crates.io/crates/ads
Apache License 2.0
40 stars 8 forks source link

"Failed to read data" from PLC #9

Closed birkenfeld closed 1 year ago

birkenfeld commented 1 year ago

Using ads = { git = "https://github.com/birkenfeld/ads-rs.git" } in the Cargo.toml file and the same large project I am getting a new error message, and it is printing my first lines (just for my test setup). Would you like me to open a new Issue for that error message?

Starting Execution at time 2022-09-21T16:45:28.716185300-05:00.
[2022-09-21T21:45:28Z INFO  actix_server::builder] Starting 8 workers
[2022-09-21T21:45:28Z INFO  actix_server::server] Actix runtime found; starting in Actix runtime
"GVL_Constants.NDX_MAX_XXXX" type: "USINT" value: 4
"MAIN._M_Test.XXXX" type: "ULINT" value: 0
"MAIN._M_Test.XYZ type: "ULINT" value: 0
"MAIN._M_Test.YD" type: "ULINT" value: 5
"MAIN._M_Test.ABC" type: "ULINT" value: 0
"MAIN._M_Test.EFG" type: "BOOL" value: false
"MAIN._M_Test.HIJ" type: "ULINT" value: 0
"MAIN.ActiveXXXX" type: "REFERENCE TO FB_XXXX" value: [123, 1, 1, 1, 1, 1, 1, 255]"MAIN.ActiveXXXXX" type: "E_YYYYY" value: [0, 0, 0, 0]
thread 'actix-rt|system:0|arbiter:0' panicked at 'Failed to read the data from the PLC handle with error read data: Reading/writing not permitted (0x704)', src\resource\ads_communication.rs:38:31
stack backtrace:
   0:     0x7ff69ef4d3cf - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff69ef4d3cf - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff69ef4d3cf - std::sys_common::backtrace::_print_fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:66
   3:     0x7ff69ef4d3cf - std::sys_common::backtrace::_print::impl$0::fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:45
   4:     0x7ff69ef6429a - core::fmt::write
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\fmt\mod.rs:1197
   5:     0x7ff69ef47619 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\io\mod.rs:1672
   6:     0x7ff69ef4fa5b - std::sys_common::backtrace::_print
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:48
   7:     0x7ff69ef4fa5b - std::sys_common::backtrace::print
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:35
   8:     0x7ff69ef4fa5b - std::panicking::default_hook::closure$1
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:295
   9:     0x7ff69ef4f6db - std::panicking::default_hook
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:314
  10:     0x7ff69ef50009 - std::panicking::rust_panic_with_hook
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:698
  11:     0x7ff69ef4ff0d - std::panicking::begin_panic_handler::closure$0
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:588
  12:     0x7ff69ef4dd57 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys_common\backtrace.rs:138
  13:     0x7ff69ef4fbe9 - std::panicking::begin_panic_handler
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:584
  14:     0x7ff69efbee15 - core::panicking::panic_fmt
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:142
  15:     0x7ff69e8d6699 - rust_config_param_viewer::api::ads_communication::get_ads_symbols
                               at C:\projects\rust_config_param_viewer\src\resource\ads_communication.rs:38
  16:     0x7ff69e96de3c - rust_config_param_viewer::api::impl$4::register::get_sysParamList::async_fn$0  
                               at C:\projects\rust_config_param_viewer\src\resource\api.rs:58
  17:     0x7ff69e8d38c7 - core::future::from_generator::impl$1::poll<enum$<rust_config_param_viewer::api::impl$4::register::get_sysParamList::async_fn_env$0> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\mod.rs:91
  18:     0x7ff69e96697e - actix_web::handler::handler_service::closure$0::async_block$0<core::future::from_generator::GenFuture<enum$<rust_config_param_viewer::api::impl$4::register::get_sysParamList::async_fn_env$0> > (*)(),tuple$<> >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-web-4.2.1\src\handler.rs:105
  19:     0x7ff69e8d30a7 - core::future::from_generator::impl$1::poll<enum$<actix_web::handler::handler_service::closure$0::async_block_env$0<core::future::from_generator::GenFuture<enum$<rust_config_param_viewer::api::impl$4::register::get_sysParamList::async_fn_env$0> > (*)(),tup
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\mod.rs:91
  20:     0x7ff69e9fea49 - core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum$<core::result::Result<actix_web::service::ServiceResponse<actix_http::body::boxed::BoxBody>,actix_web::error::error::Error> > > > >,alloc::alloc::Glo
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\future.rs:124
  21:     0x7ff69ea0d43d - actix_web::resource::impl$2::register::closure$0::async_block$0<actix_web::resource::ResourceEndpoint,actix_http::body::boxed::BoxBody>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-web-4.2.1\src\resource.rs:383
  22:     0x7ff69e9f2a17 - core::future::from_generator::impl$1::poll<enum$<actix_web::resource::impl$2::register::closure$0::async_block_env$0<actix_web::resource::ResourceEndpoint,actix_http::body::boxed::BoxBody> > >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\mod.rs:91
  23:     0x7ff69e9fea49 - core::future::future::impl$1::poll<alloc::boxed::Box<dyn$<core::future::future::Future<assoc$<Output,enum$<core::result::Result<actix_web::service::ServiceResponse<actix_http::body::boxed::BoxBody>,actix_web::error::error::Error> > > > >,alloc::alloc::Glo
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\future.rs:124
  24:     0x7ff69e8d3f80 - actix_web::middleware::logger::impl$4::poll<actix_web::app_service::AppRouting,actix_http::body::boxed::BoxBody>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-web-4.2.1\src\middleware\logger.rs:302
  25:     0x7ff69e921c56 - actix_service::map_err::impl$4::poll<actix_web::app_service::AppInitService<actix_web::middleware::logger::LoggerMiddleware<actix_web::app_service::AppRouting>,actix_web::middleware::logger::StreamLog<actix_http::body::boxed::BoxBody> >,actix_http::reques
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.2\src\map_err.rs:99
  26:     0x7ff69e8fbe28 - actix_http::h1::dispatcher::InnerDispatcher<tokio::net::tcp::stream::TcpStream,actix_service::map_err::MapErr<actix_web::app_service::AppInitService<actix_web::middleware::logger::LoggerMiddleware<actix_web::app_service::AppRouting>,actix_web::middleware:
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-http-3.2.2\src\h1\dispatcher.rs:653
  27:     0x7ff69e8f5b4d - actix_http::h1::dispatcher::InnerDispatcher<tokio::net::tcp::stream::TcpStream,actix_service::map_err::MapErr<actix_web::app_service::AppInitService<actix_web::middleware::logger::LoggerMiddleware<actix_web::app_service::AppRouting>,actix_web::middleware:
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-http-3.2.2\src\h1\dispatcher.rs:744
  28:     0x7ff69e900ad8 - actix_http::h1::dispatcher::impl$4::poll<tokio::net::tcp::stream::TcpStream,actix_service::map_err::MapErr<actix_web::app_service::AppInitService<actix_web::middleware::logger::LoggerMiddleware<actix_web::app_service::AppRouting>,actix_web::middleware::lo
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-http-3.2.2\src\h1\dispatcher.rs:1129
  29:     0x7ff69e957d13 - actix_http::service::impl$8::poll<tokio::net::tcp::stream::TcpStream,actix_service::map_err::MapErr<actix_web::app_service::AppInitService<actix_web::middleware::logger::LoggerMiddleware<actix_web::app_service::AppRouting>,actix_web::middleware::logger::S
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-http-3.2.2\src\service.rs:716
  30:     0x7ff69e8b17d6 - actix_service::and_then::impl$3::poll<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::closure_env$0<actix_service::map_config::MapConfig<actix_service::map_err::MapErrServiceFactory<actix_web::app_service::AppInit<actix_service::tra
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-service-2.0.2\src\and_then.rs:114
  31:     0x7ff69e91fc56 - actix_server::service::impl$1::call::async_block$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::closure_env$0<actix_service::map_config::MapConfig<actix_service::map_err::MapErrServiceFacto
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-server-2.1.1\src\service.rs:75
  32:     0x7ff69e8d3ca9 - core::future::from_generator::impl$1::poll<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::closure_env$0<actix_service::map_config:
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\mod.rs:91
  33:     0x7ff69e8ec170 - tokio::runtime::task::core::impl$3::poll::closure$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\core.rs:184
  34:     0x7ff69e962f02 - tokio::loom::std::unsafe_cell::UnsafeCell<enum$<tokio::runtime::task::core::Stage<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnSer
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\loom\std\unsafe_cell.rs:14
  35:     0x7ff69e8ebf7f - tokio::runtime::task::core::CoreStage<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::closu
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\core.rs:174
  36:     0x7ff69e891e8a - tokio::runtime::task::harness::poll_future::closure$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::im
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\harness.rs:480
  37:     0x7ff69e927923 - core::panic::unwind_safe::impl$23::call_once<enum$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::task::harness::poll_future::closure_env$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_ser
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\panic\unwind_safe.rs:271
  38:     0x7ff69e916eb0 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then:
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panicking.rs:492
  39:     0x7ff69e917703 - std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::impl$1::complete::closure_env$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and
  40:     0x7ff69e9162e6 - std::panicking::try<enum$<core::task::poll::Poll<tuple$<> > >,core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_blo
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panicking.rs:456
  41:     0x7ff69e8d5f1b - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::poll_future::closure_env$0<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::And
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panic.rs:137
  42:     0x7ff69e89195e - tokio::runtime::task::harness::poll_future<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\harness.rs:468
  43:     0x7ff69e892225 - tokio::runtime::task::harness::Harness<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::clos
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\harness.rs:104
  44:     0x7ff69e892f53 - tokio::runtime::task::harness::Harness<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::clos
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\harness.rs:57
  45:     0x7ff69e982572 - tokio::runtime::task::raw::poll<core::future::from_generator::GenFuture<enum$<actix_server::service::impl$1::call::async_block_env$0<actix_service::and_then::AndThenService<actix_service::fn_service::FnService<actix_http::service::impl$3::tcp::closure_env
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\raw.rs:194
  46:     0x7ff69ee27e50 - tokio::runtime::task::raw::RawTask::poll
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\raw.rs:134
  47:     0x7ff69ee12ec2 - tokio::runtime::task::LocalNotified<alloc::sync::Arc<tokio::task::local::Shared> >::run<alloc::sync::Arc<tokio::task::local::Shared> >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\task\mod.rs:385
  48:     0x7ff69ee37cfe - tokio::task::local::impl$2::tick::closure$0
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:578
  49:     0x7ff69edea305 - tokio::coop::with_budget::closure$0<tuple$<>,tokio::task::local::impl$2::tick::closure_env$0>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:102
  50:     0x7ff69ede7942 - std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget> >::try_with<core::cell::Cell<tokio::coop::Budget>,tokio::coop::with_budget::closure_env$0<tuple$<>,tokio::task::local::impl$2::tick::closure_env$0>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:445
  51:     0x7ff69ede7664 - std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget> >::with<core::cell::Cell<tokio::coop::Budget>,tokio::coop::with_budget::closure_env$0<tuple$<>,tokio::task::local::impl$2::tick::closure_env$0>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:421
  52:     0x7ff69ee37ca3 - tokio::coop::with_budget
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:95
  53:     0x7ff69ee37ca3 - tokio::coop::budget
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:72
  54:     0x7ff69ee37ca3 - tokio::task::local::LocalSet::tick
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:578
  55:     0x7ff69edbb9b6 - tokio::task::local::impl$8::poll::closure$0<actix_rt::arbiter::ArbiterRunner>  
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:845
  56:     0x7ff69edba808 - tokio::task::local::impl$2::with::closure$0<enum$<core::task::poll::Poll<tuple$<> > >,tokio::task::local::impl$8::poll::closure_env$0<actix_rt::arbiter::ArbiterRunner> >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:633
  57:     0x7ff69ede492a - std::thread::local::LocalKey<core::cell::Cell<enum$<core::option::Option<alloc::rc::Rc<tokio::task::local::Context> >, 1, 18446744073709551615, Some> > >::try_with<core::cell::Cell<enum$<core::option::Option<alloc::rc::Rc<tokio::task::local::Context> >, 1
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:445
  58:     0x7ff69ede3b96 - std::thread::local::LocalKey<core::cell::Cell<enum$<core::option::Option<alloc::rc::Rc<tokio::task::local::Context> >, 1, 18446744073709551615, Some> > >::with<core::cell::Cell<enum$<core::option::Option<alloc::rc::Rc<tokio::task::local::Context> >, 1, 18
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:421
  59:     0x7ff69edba75e - tokio::task::local::LocalSet::with<enum$<core::task::poll::Poll<tuple$<> > >,tokio::task::local::impl$8::poll::closure_env$0<actix_rt::arbiter::ArbiterRunner> >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:616
  60:     0x7ff69edbb7f2 - tokio::task::local::impl$8::poll<actix_rt::arbiter::ArbiterRunner>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:831
  61:     0x7ff69edbae1e - tokio::task::local::impl$2::run_until::async_fn$0<actix_rt::arbiter::ArbiterRunner>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:536
  62:     0x7ff69edbbd49 - core::future::from_generator::impl$1::poll<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\mod.rs:91
  63:     0x7ff69edd1a7a - core::future::future::impl$1::poll<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > > >                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\future\future.rs:124
  64:     0x7ff69edc7e5a - tokio::runtime::scheduler::current_thread::impl$9::block_on::closure$0::closure$0::closure$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:525
  65:     0x7ff69edc9fa9 - tokio::coop::with_budget::closure$0<enum$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::scheduler::current_thread::impl$9::block_on::closure$0::closure$0::closure_env$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::tas
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:102
  66:     0x7ff69ede471a - std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget> >::try_with<core::cell::Cell<tokio::coop::Budget>,tokio::coop::with_budget::closure_env$0<enum$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::scheduler::current_thread::impl$9::block
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:445
  67:     0x7ff69ede375d - std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget> >::with<core::cell::Cell<tokio::coop::Budget>,tokio::coop::with_budget::closure_env$0<enum$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::scheduler::current_thread::impl$9::block_on:
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\local.rs:421
  68:     0x7ff69edc7c72 - tokio::coop::with_budget
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:95
  69:     0x7ff69edc7c72 - tokio::coop::budget
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\coop.rs:72
  70:     0x7ff69edc7c72 - tokio::runtime::scheduler::current_thread::impl$9::block_on::closure$0::closure$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > > > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:525
  71:     0x7ff69edc60eb - tokio::runtime::scheduler::current_thread::Context::enter<enum$<core::task::poll::Poll<tuple$<> > >,tokio::runtime::scheduler::current_thread::impl$9::block_on::closure$0::closure_env$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:349
  72:     0x7ff69edc6efb - tokio::runtime::scheduler::current_thread::impl$9::block_on::closure$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > > > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:524
  73:     0x7ff69edc6bf0 - tokio::runtime::scheduler::current_thread::impl$9::enter::closure$0<tokio::runtime::scheduler::current_thread::impl$9::block_on::closure_env$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::asy
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:595
  74:     0x7ff69edc4b21 - tokio::macros::scoped_tls::ScopedKey<tokio::runtime::scheduler::current_thread::Context>::set<tokio::runtime::scheduler::current_thread::Context,tokio::runtime::scheduler::current_thread::impl$9::enter::closure_env$0<tokio::runtime::scheduler::current_thr
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\macros\scoped_tls.rs:61
  75:     0x7ff69edc667a - tokio::runtime::scheduler::current_thread::CoreGuard::enter<tokio::runtime::scheduler::current_thread::impl$9::block_on::closure_env$0<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_en
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:595
  76:     0x7ff69edc6cb5 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on<core::pin::Pin<ref_mut$<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > > > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:515
  77:     0x7ff69edc52ad - tokio::runtime::scheduler::current_thread::CurrentThread::block_on<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\scheduler\current_thread.rs:161
  78:     0x7ff69ede3197 - tokio::runtime::Runtime::block_on<core::future::from_generator::GenFuture<enum$<tokio::task::local::impl$2::run_until::async_fn_env$0<actix_rt::arbiter::ArbiterRunner> > > >
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\runtime\mod.rs:490
  79:     0x7ff69edbaa61 - tokio::task::local::LocalSet::block_on<actix_rt::arbiter::ArbiterRunner>       
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.21.1\src\task\local.rs:497
  80:     0x7ff69edbc047 - actix_rt::runtime::Runtime::block_on<actix_rt::arbiter::ArbiterRunner>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-rt-2.7.0\src\runtime.rs:80
  81:     0x7ff69ea86850 - actix_rt::arbiter::impl$2::with_tokio_rt::closure$0<actix_server::worker::impl$10::start::closure_env$1>
                               at C:\Users\testUser\.cargo\registry\src\github.com-1ecc6299db9ec823\actix-rt-2.7.0\src\arbiter.rs:144
  82:     0x7ff69ea6dc00 - std::sys_common::backtrace::__rust_begin_short_backtrace<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\sys_common\backtrace.rs:122
  83:     0x7ff69ea70704 - std::thread::impl$0::spawn_unchecked_::closure$1::closure$0<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >      
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\mod.rs:505
  84:     0x7ff69ea4fa64 - core::panic::unwind_safe::impl$23::call_once<tuple$<>,std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> > >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\panic\unwind_safe.rs:271
  85:     0x7ff69ea89181 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panicking.rs:492
  86:     0x7ff69ea8c173 - alloc::vec::into_iter::impl$15::as_inner<tuple$<usize,enum$<actix_server::socket::MioListener, Tcp> >,alloc::alloc::Global>
  87:     0x7ff69ea886fb - std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panicking.rs:456
  88:     0x7ff69ea65fb4 - std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> > >,t
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\panic.rs:137
  89:     0x7ff69ea6fe06 - std::thread::impl$0::spawn_unchecked_::closure$1<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\std\src\thread\mod.rs:504
  90:     0x7ff69ea3e48e - core::ops::function::FnOnce::call_once<std::thread::impl$0::spawn_unchecked_::closure_env$1<actix_rt::arbiter::impl$2::with_tokio_rt::closure_env$0<actix_server::worker::impl$10::start::closure_env$1>,tuple$<> >,tuple$<> >
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f\library\core\src\ops\function.rs:248
  91:     0x7ff69ef5295c - alloc::boxed::impl$44::call_once
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\alloc\src\boxed.rs:1951
  92:     0x7ff69ef5295c - alloc::boxed::impl$44::call_once
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\alloc\src\boxed.rs:1951
  93:     0x7ff69ef5295c - std::sys::windows::thread::impl$0::new::thread_start
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sys\windows\thread.rs:56
  94:     0x7ff974a47034 - BaseThreadInitThunk
  95:     0x7ff9760a26a1 - RtlUserThreadStart

Originally posted by @alex-boring in https://github.com/birkenfeld/ads-rs/issues/8#issuecomment-1254264293

birkenfeld commented 1 year ago

So this is an error coming from the PLC (as opposed to an ads-rs internal bug in #8).

It will be hard to debug without knowing what exactly is requested there. Can you share the relevant part of the code (the immediate cause is in your get_ads_symbols function)?

It might also just be that the PLC disallows reading the value of certain symbols. In that case you'll have to catch that error and handle it instead of panicking by calling unwrap or similar...

birkenfeld commented 1 year ago

(cc @alex-boring if you weren't subscribed automatically)

alex-boring commented 1 year ago

That error is on me, I fixed the issue on my side. Thanks for the hints. You can close this one out!

birkenfeld commented 1 year ago

Great! I'll release the current master as 0.4.2 then.