here is the problem,some time i debug the program,the main thread is panicked,the error message is "Os { code: 4, kind: Interrupted, message: "Interrupted system call" }" .
i check the message of stack backtrace:
0: 0x10eed179f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h83d53b696ac99295
1: 0x10eef349e - core::fmt::write::hf81c429634e1f3ed
2: 0x10eecb697 - std::io::Write::write_fmt::had2a3b01a2c037b5
3: 0x10eed37fa - std::panicking::default_hook::{{closure}}::ha991e4eca34b4afa
4: 0x10eed353c - std::panicking::default_hook::h722aa3f5c1c31788
5: 0x10eed3dc8 - std::panicking::rust_panic_with_hook::h2cd47f71d6d55501
6: 0x10eed3992 - rust_begin_unwind
7: 0x10eeffe1f - core::panicking::panic_fmt::h299f54c72477a62a
8: 0x10eeffd25 - core::result::unwrap_failed::hf7a9e1e19e331f17
9: 0x10ec3d724 - core::result::Result<T,E>::unwrap::h9975a074967eec7d
10: 0x10eb3eaf1 - roomserver::net::tcp_server::new::h8f40227fb3e7e9ef
11: 0x10eb3f493 - roomserver::init_tcp_server::h78d2942b8cb2f489
12: 0x10eb3f3ea - roomserver::main::hcba912d14543799c
13: 0x10eb4774e - std::rt::lang_start::{{closure}}::hfd56a12f21fe1ec1
14: 0x10eed4129 - std::rt::lang_start_internal::h1069bf3e81ece2dd
15: 0x10eb47731 - std::rt::lang_start::hd02c25651ee7fbc4
16: 0x10eb3f602 - main
the "roomserver::net::tcp_server::new" is a function to create a tcp server struct and run.
but it's ok in release,only when i debug occur this kind of error.
i guess maybe because of breakpoint make main thread blocked,but OS try to send signal to a blocked thread causes errors to occur? i do not know.
so how to fix it?
thanks for advices!