Crash on pressing "cc" in query window
Closed this issue · 5 comments
bug description
When I type "cc" in the query window, rainfrog crashes.
technical details
system info
- Ubuntu 20.04, kernel 5.4.0-181-generic
- rainfrog 0.2.0-VERGEN_IDEMPOTENT_OUTPUT (2024-09-17)
crash logs
name = "rainfrog"
operating_system = "Ubuntu 20.4.0 (focal) [64-bit]"
crate_version = "0.2.0"
explanation = """
Panic occurred in file '/home/mmior/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rainfrog-0.2.0/src/vim.rs' at line 344
"""
cause = 'called Result::unwrap()
on an Err
value: Unknown { .. } - "Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable"'
method = "Panic"
backtrace = """
0: 0x556eb246eddb - rainfrog::components::editor::Editor::transition_vim_state::h3d20a324e016faeb
1: 0x556eb2469670 - <rainfrog::components::editor::Editor as rainfrog::components::Component>::handle_events::h8f0e2253b14231bc
2: 0x556eb25372c3 - rainfrog::app::App::run::{{closure}}::he0d0e37f1050d599
3: 0x556eb2527cb5 - tokio::runtime::runtime::Runtime::block_on::h7a11a1e1f1e03fdf
4: 0x556eb24f508f - rainfrog::main::h95949b0ba75cec25
5: 0x556eb259d463 - std::sys::backtrace::__rust_begin_short_backtrace::h0cf30c58468529e8
6: 0x556eb24f4ca2 - main
7: 0x7f649a4aa083 - __libc_start_main
at /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:308
8: 0x556eb2255fee - _start
9: 0x0 - """
### steps to reproduce
Steps to reproduce the behavior. If possible, include the preceding query with sensitive information removed:
1. Press Alt+2 to go to the query window
2. Press cc
thanks for reporting; looks like it might be an issue with the clipboard manager: 1Password/arboard#153
will investigate
i was able to reproduce in a vm; it looks like extending the timeout for creating the Clipboard instance might help (1Password/arboard#147), so i will try that later to see if that's the issue or if there's a different root cause
in the meantime, i have a pr to fallback to using the textarea's buffer instead of panicking: #81
@achristmascarl Thanks! Confirmed that PR prevents the panic on my machine.
great! i'll close this for now, and continue tracking the X11 clipboard timeout here: #83
Included in release v0.2.1