BUG | failed to send tick event: SendError { .. }
mertssmnoglu opened this issue ยท 5 comments
Describe the bug
I just want to try flawz without any arguments/flags to see how it results. It worked, but when I want to quit I expecting it to end without any logs but it gave me a panic
warning.
thread '<unnamed>' panicked at src/event.rs:65:50
failed to send tick event: SendError { .. }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
To reproduce
Steps to reproduce the behavior:
- Installed with
sudo pacman -S flawz
// Successful - Run with 0 arguments and 0 flags, only
flawz
- Waited to sync all CVEs
- All CVEs listed, pressed
q
to quit.
Expected behavior
Exiting with code 0 without any logs
Screenshots / Logs
Software information
- Operating system: Arch GNU/Linux x86_64 6.8.9-zen1-2-zen
- Rust version: rustc 1.73.0 (cc66ad468 2023-10-03)
- Project version: 0.1.0-1
Additional context
I also tried to follow the guide on the logs,
First:
It gives null stack backtrace, I followed up with RUST_BACKTRACE=full
Second:
Thanks for reporting!
I also experienced this issue a couple of times but I'm not sure why it is happening. I'm guessing maybe it is related to the timing of the tick event and quitting the TUI at the same time. I will investigate.
For some context, I initialized this project from the ratatui sync template, I wonder if that repo has the same issue as well.
An error during send means the other side of the channel stopped listening. It's not an error that should be panicked on, it's the expected way to end the listening (unless you add cancellation in another way).
I haven't looked at the source for this, but either ignoring it this error, or exiting any loop, thread or task that it's called from is the right thing to do instead of panicking.
Just realized we panic on this in the template too:
I removed the tick event (since it wasn't used anyways) so it should be good now.
Just realized we panic on this in the template too:
* https://github.com/ratatui-org/templates/blob/main/simple/src/event.rs#L65 * https://github.com/ratatui-org/templates/blob/main/simple-async/src/event.rs#L51
There's a bug for this in ratatui/templates#49 :)