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

Backtrace #7

Closed
GeneL opened this issue Mar 2, 2022 · 6 comments
Closed

Backtrace #7

GeneL opened this issue Mar 2, 2022 · 6 comments

Comments

@GeneL
Copy link

GeneL commented Mar 2, 2022

template instance:
Template { instance_id: 1575, handle: 13998, member_count: 233, object_size: 1411, struct_size: 1868 }
thread 'main' panicked at 'assertion failed: self.remaining() >= dst.len()', ../.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/buf/buf_impl.rs:253:9
stack backtrace:
0: rust_begin_unwind
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/core/src/panicking.rs:143:14
2: core::panicking::panic
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/core/src/panicking.rs:48:5
3: bytes::buf::buf_impl::Buf::copy_to_slice
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/buf/buf_impl.rs:253:9
4: bytes::buf::buf_impl::Buf::get_u16_le
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.1.0/src/buf/buf_impl.rs:354:9
5: <rseip::client::ab_eip::template::decoder::DefaultDefinitionDecoder as rseip::client::ab_eip::template::decoder::DefinitionDecoder>::partial_decode
at ./src/client/ab_eip/template/decoder.rs:60:39
6: rseip::client::ab_eip::template::TemplateRead<T,D>::call::{{closure}}
at ./src/client/ab_eip/template.rs:197:13
7: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/core/src/future/mod.rs:91:19
8: rseip::main::{{closure}}
at ./src/main.rs:30:54
9: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/core/src/future/mod.rs:91:19
10: tokio::park::thread::CachedParkThread::block_on::{{closure}}
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:54
11: tokio::coop::with_budget::{{closure}}
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:102:9
12: std::thread::local::LocalKey::try_with
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/std/src/thread/local.rs:413:16
13: std::thread::local::LocalKey::with
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/std/src/thread/local.rs:389:9
14: tokio::coop::with_budget
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:95:5
15: tokio::coop::budget
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:72:5
16: tokio::park::thread::CachedParkThread::block_on
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:31
17: tokio::runtime::enter::Enter::block_on
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/enter.rs:151:13
18: tokio::runtime::thread_pool::ThreadPool::block_on
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/thread_pool/mod.rs:73:9
19: tokio::runtime::Runtime::block_on
at ../.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/mod.rs:477:43
20: rseip::main
at ./src/main.rs:33:5
21: core::ops::function::FnOnce::call_once
at /rustc/6a705566166debf5eff88c57140df607fa409aaa/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

@Joylei
Copy link
Owner

Joylei commented Mar 3, 2022

please try the code of perf branch, and let me know if it's working or not.

rseip={git="https://github.com/Joylei/eip-rs", branch="perf"}

@GeneL
Copy link
Author

GeneL commented Mar 3, 2022

This backtrace is from the current code

@Joylei
Copy link
Owner

Joylei commented Mar 3, 2022

please try the perf branch

@GeneL
Copy link
Author

GeneL commented Mar 3, 2022 via email

@Joylei
Copy link
Owner

Joylei commented Mar 3, 2022

change your code like this

{
        let mut req = client.read_template(&template);
        let info = req.call().await?;
        println!("template definition:\n{:?}", info);
    }

@GeneL
Copy link
Author

GeneL commented Mar 3, 2022 via email

@Joylei Joylei closed this as completed Mar 12, 2022
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