jless icon indicating copy to clipboard operation
jless copied to clipboard

`jless` crashes when using mouse interactions after running `docker compose`

Open zzh1996 opened this issue 1 month ago • 4 comments

I encountered an issue with jless where it crashes when I use mouse interactions (clicking or scrolling) after having executed the docker compose command in the terminal. Below are the details:

Steps to Reproduce:

  1. Open a terminal.
  2. Run docker compose up in a directory with docker-compose.yml provided below. (docker compose should be V2.)
services:
  test:
    image: ubuntu:latest
  1. After the command completes, run curl https://api.github.com/repos/PaulJuliusMartinez/jless/commits -o commits.json.
  2. Run jless commits.json.
  3. Try clicking or scrolling within jless.

Expected Behavior:

jless should function normally without crashing.

Actual Behavior:

jless crashes upon using the mouse for clicking or scrolling.

Environment:

  • Terminal Emulators:
    • iTerm2 3.5.0
    • macOS 14.5 built-in terminal
  • Versions:
    • docker compose version: Docker Compose version v2.27.0-desktop.2
    • jless version: jless 0.9.0 (installed via brew)

Additional Information:

  • The issue is reproducible across different terminal emulators.
  • It doesn't seem related to environment variables or the shell being used (zsh or bash).
  • Programs such as htop and vim work normally when using mouse interactions after running docker compose.

I have attached an asciinema recording showcasing the issue.

https://asciinema.org/a/WatTzwyRfqAWPqBykN6yyr0CA

Error message:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/termion-1.5.6/src/event.rs:199:29
stack backtrace:
   0:        0x1022a8238 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he69c0e17cb41f255
   1:        0x1022cd5eb - core::fmt::write::h66293df4c7dd941a
   2:        0x102287a56 - std::io::Write::write_fmt::h2f5a7ea5f48a0b56
   3:        0x1022a8000 - std::sys_common::backtrace::print::h71fd332624ce1826
   4:        0x1022a8f55 - std::panicking::default_hook::{{closure}}::ha2a0e70fb3678142
   5:        0x1022a8cd1 - std::panicking::default_hook::hb166cd42dec7ff92
   6:        0x1022a9518 - std::panicking::rust_panic_with_hook::h2b924837648ff0c0
   7:        0x1022a9412 - std::panicking::begin_panic_handler::{{closure}}::h04e24a68d30d9f5c
   8:        0x1022a8469 - std::sys_common::backtrace::__rust_end_short_backtrace::hd45b5152c8265971
   9:        0x1022a91cd - _rust_begin_unwind
  10:        0x1022da7d3 - core::panicking::panic_fmt::h9302663e63786640
  11:        0x1022da85e - core::panicking::panic::hc241fa596ee7b5bf
  12:        0x10216f5f4 - termion::event::parse_csi::h1709409a441283d0
  13:        0x102170446 - jless::input::TuiInput::get_event_from_buffered_input::h7f0fba804f003d22
  14:        0x102170976 - <jless::input::TuiInput as core::iter::traits::iterator::Iterator>::next::hdef361545a2dadad
  15:        0x102145c24 - jless::app::App::run::hae1b7190ed3f5cf3
  16:        0x10213c51d - jless::main::ha5528f325379956b
  17:        0x102178816 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf374a4127f440e46
  18:        0x10217b56c - std::rt::lang_start::{{closure}}::h474d26d9797e8a23
  19:        0x1022a90b4 - std::panicking::try::hb5cb29dbfee1dcfc
  20:        0x10229074e - std::rt::lang_start_internal::h634e63ff6023f727
  21:        0x10213cc2c - _main
  22:     0x7ff80a883366 - <unknown>

zzh1996 avatar Jun 07 '24 19:06 zzh1996