ulyssa / iamb

A Matrix client for Vim addicts
https://iamb.chat
Apache License 2.0
608 stars 45 forks source link

reproducible crash when opened with split pane and then <c-w>o to switch to one pane #307

Closed ajkessel closed 1 month ago

ajkessel commented 2 months ago

linux iamb 0.0.10-alpha.1 (497be7f)

open iamb with two panes already visible; then <c-w>o, results in reproducible crash

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/modalkit-ratatui-0.0.19/src/windows/layout.rs:75:5:
assertion `left == right` failed
  left: 2
 right: 1
stack backtrace:
   0:     0x555e25e56e32 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hffecb437d922f988
   1:     0x555e25e8819c - core::fmt::write::hd9a8d7d029f9ea1a
   2:     0x555e25e5254f - std::io::Write::write_fmt::h0e1226b2b8d973fe
   3:     0x555e25e56c04 - std::sys_common::backtrace::print::he907f6ad7eee41cb
   4:     0x555e25e5872b - std::panicking::default_hook::{{closure}}::h3926193b61c9ca9b
   5:     0x555e25e58483 - std::panicking::default_hook::h25ba2457dea68e65
   6:     0x555e247a65e0 - iamb::run::{{closure}}::{{closure}}::hfe0280332b6ab4ee
   7:     0x555e25e58d60 - std::panicking::rust_panic_with_hook::h0ad14d90dcf5224f
   8:     0x555e25e58aa2 - std::panicking::begin_panic_handler::{{closure}}::h4a1838a06f542647
   9:     0x555e25e57306 - std::sys_common::backtrace::__rust_end_short_backtrace::h77cc4dc3567ca904
  10:     0x555e25e587d4 - rust_begin_unwind
  11:     0x555e23ae9a35 - core::panicking::panic_fmt::h940d4fd01a4b4fd1
  12:     0x555e23ae9dcb - core::panicking::assert_failed_inner::h3fa4c4749ee29c1d
  13:     0x555e23a6db7f - core::panicking::assert_failed::h9e9ea2fa36b191c7
  14:     0x555e24379c8e - modalkit_ratatui::windows::layout::set_area_lens::h5cc2463bb6b56109
  15:     0x555e243ef64c - <modalkit_ratatui::screen::Screen<W,I> as ratatui::widgets::StatefulWidget>::render::hec4be6fc76db5ddd
  16:     0x555e241bb5bf - ratatui::terminal::terminal::Terminal<B>::draw::hda50182df223d271
  17:     0x555e2486a59b - iamb::Application::redraw::h4ccda3902ac614b2
  18:     0x555e2479fa3d - iamb::run::{{closure}}::he4dd07b3e2c036ed
  19:     0x555e2475b995 - tokio::runtime::park::CachedParkThread::block_on::h315f06b035a683c4
  20:     0x555e241b74cf - tokio::runtime::runtime::Runtime::block_on::haa0c6f0dac88feac
  21:     0x555e2486b884 - iamb::main::hf9885e97fef6b34d
  22:     0x555e24394f86 - std::sys_common::backtrace::__rust_begin_short_backtrace::h72ce150712811018
  23:     0x555e24463c45 - std::rt::lang_start::{{closure}}::habd5be299d6b04a3
  24:     0x555e25e49503 - std::rt::lang_start_internal::h103c42a9c4e95084
  25:     0x555e2486c245 - main
  26:     0x7f35fb4e5d90 - <unknown>
  27:     0x7f35fb4e5e40 - __libc_start_main
  28:     0x555e23aea0e5 - _start
  29:                0x0 - <unknown>
ulyssa commented 1 month ago

I fixed this in ulyssa/modalkit#147. I've updated the modalkit-ratatui dependency to pull it in in #319.