yassinebridi / serpl

A simple terminal UI for search and replace, ala VS Code.
MIT License
524 stars 3 forks source link

Panic when run the command from within Helix editor. #30

Open H4ckint0sh opened 1 month ago

H4ckint0sh commented 1 month ago

The Program panics when I run it from within Helix editor with the following command.

C-g = [":new", ":insert-output serpl", ":buffer-close!", ":redraw"]

and here is the report

name = "serpl"
operating_system = "Mac OS 14.5.0 [64-bit]"
crate_version = "0.3.1"
explanation = """
Panic occurred in file '/Users/ali/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossterm-0.27.0/src/event/read.rs' at line 39
"""
cause = "reader source not set"
method = "Panic"
backtrace = """

   0: 0x104e18188 - rust_begin_unwind
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645
   1: 0x104e59ba0 - core::panicking::panic_fmt::h33e40d2a93cab78f
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72
   2: 0x104e59b6c - core::panicking::panic_display::h3147bab0bf654774
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:196
                 - core::panicking::panic_str::h2632432394f9d133
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:171
                 - core::option::expect_failed::h8c59d9d921ed2136
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:1980
   3: 0x104d02f2c - <crossterm::event::stream::EventStream as core::default::Default>::default::h993a291f61217a16
   4: 0x104b785ac - serpl::tui::Tui::start::{{closure}}::h5a633b7db7debe73
   5: 0x104b777bc - tokio::runtime::task::core::Core<T,S>::poll::ha55443cd9310195b
   6: 0x104b6e698 - tokio::runtime::task::harness::Harness<T,S>::poll::h2d167736f3c62e95
   7: 0x104ccc82c - tokio::runtime::scheduler::multi_thread::worker::Context::run_task::h519a073ddf94ec48
   8: 0x104ccb858 - tokio::runtime::scheduler::multi_thread::worker::Context::run::he4c8b659a95ac90d
   9: 0x104cdfed8 - tokio::runtime::context::scoped::Scoped<T>::set::h40b1c16ae1d6d257
  10: 0x104cd1378 - tokio::runtime::context::runtime::enter_runtime::hd8117086045b1e30
  11: 0x104ccb3c8 - tokio::runtime::scheduler::multi_thread::worker::run::h0bead4250497aa3d
  12: 0x104ce3a5c - <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll::h154d6da0de7af594
  13: 0x104cd4d8c - tokio::runtime::task::core::Core<T,S>::poll::h7104cba8d880ab52
  14: 0x104cc52ec - tokio::runtime::task::harness::Harness<T,S>::poll::h741a86f27d65c510
  15: 0x104cd7e7c - std::sys_common::backtrace::__rust_begin_short_backtrace::h43484116091d242a
  16: 0x104cdb478 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9fe57f631fa9b283
  17: 0x104e1c38c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h122931d29f919766
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015
                 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h222f385c86e71c13
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2015
                 - std::sys::unix::thread::Thread::new::thread_start::h8dda2af345bab446
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys/unix/thread.rs:108
  18: 0x18d01ef94 - __pthread_joiner_wake"""
yassinebridi commented 1 month ago

Hey, thanks for the report, i will try to reproduce and fix it when i have a bit of time.