Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows with a height of 0 cause Neovide to freeze when using multigrid #2136

Closed
Ontonator opened this issue Nov 17, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Ontonator
Copy link

Ontonator commented Nov 17, 2023

Describe the bug
When multigrid is enabled, causing a window with a height of 0 cause Neovide to freeze and become unresponsive.

To Reproduce

  1. Open neovide
  2. Run :set winminheight=0
  3. Split the window with <C-W>s
  4. Increase the size of the active window such that the inactive window's height becomes 0 using 1000<C-W>_

Expected behavior
The active window should expand to fill as much space as it can. The inactive window should shrink to a height of 0. Neovide should remain responsive.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11 22H2 with WSL Ubuntu 22.04
  • Neovide Version: 0.11.2 (f093080)
  • Neovim Version: NVIM v0.10.0-dev

Please run neovide --log and paste the contents of the .log file created in the current directory here:

2023-11-17 00:21:37 - Neovide panicked with the message 'attempt to calculate the remainder with a divisor of zero'. (File: /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\core\src\num\mod.rs; Line: 455, Column: 5)
   0: backtrace::backtrace::dbghelp::trace
             at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\dbghelp.rs:98
   1: backtrace::backtrace::trace_unsynchronized<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\mod.rs:66
   2: backtrace::backtrace::trace<backtrace::capture::impl$1::create::closure_env$0>
             at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\backtrace\mod.rs:53
   3: backtrace::capture::Backtrace::create
             at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\capture.rs:176
   4: backtrace::capture::Backtrace::new
             at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\backtrace-0.3.69\src\capture.rs:140
   5: neovide::main::closure$0
             at src\main.rs:74
   6: alloc::boxed::impl$49::call
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\alloc\src\boxed.rs:2021
   7: std::panicking::rust_panic_with_hook
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panicking.rs:735
   8: std::panicking::begin_panic_handler::closure$0
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panicking.rs:601
   9: std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\sys_common\backtrace.rs:170
  10: std::panicking::begin_panic_handler
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panicking.rs:597
  11: core::panicking::panic_fmt
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\core\src\panicking.rs:72
  12: core::panicking::panic
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\core\src\panicking.rs:127
  13: core::num::impl$5::rem_euclid
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\core\src\num\int_macros.rs:2191
  14: neovide::utils::ring_buffer::RingBuffer<neovide::editor::grid::GridLine>::get_array_index<neovide::editor::grid::GridLine>
             at src\utils\ring_buffer.rs:87
  15: neovide::utils::ring_buffer::RingBuffer<neovide::editor::grid::GridLine>::resize<neovide::editor::grid::GridLine>
             at src\utils\ring_buffer.rs:75
  16: neovide::editor::grid::CharacterGrid::resize
             at src\editor\grid.rs:45
  17: neovide::editor::window::Window::resize
             at src\editor\window.rs:115
  18: neovide::editor::Editor::resize_window
             at src\editor\mod.rs:298
  19: neovide::editor::Editor::handle_editor_command
             at src\editor\mod.rs:169
  20: neovide::editor::start_editor::closure$0
             at src\editor\mod.rs:555
  21: std::sys_common::backtrace::__rust_begin_short_backtrace<neovide::editor::start_editor::closure_env$0,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\sys_common\backtrace.rs:154
  22: std::sys_common::backtrace::__rust_begin_short_backtrace<neovide::editor::start_editor::closure_env$0,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\sys_common\backtrace.rs:154
  23: std::thread::impl$0::spawn_unchecked_::closure$1::closure$0<neovide::editor::start_editor::closure_env$0,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\thread\mod.rs:529
  24: core::panic::unwind_safe::impl$23::call_once<tuple$<>,std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<neovide::editor::start_editor::closure_env$0,tuple$<> > >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\core\src\panic\unwind_safe.rs:271
  25: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<neovide::editor::start_editor::closure_env$0,tuple$<> > >,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\panicking.rs:504
  26: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<tokio::runtime::task::harness::impl$2::drop_join_handle_slow::closure_env$0<enum2$<neovide::bridge::ui_commands::start_ui_command_handler::async_block$0::async_block_env$0>,alloc::sy
  27: std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<neovide::editor::start_editor::closure_env$0,tuple$<> > > >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\panicking.rs:468
  28: std::panic::catch_unwind
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\panic.rs:142
  29: std::thread::impl$0::spawn_unchecked_::closure$1<neovide::editor::start_editor::closure_env$0,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\std\src\thread\mod.rs:528
  30: core::ops::function::FnOnce::call_once<std::thread::impl$0::spawn_unchecked_::closure_env$1<neovide::editor::start_editor::closure_env$0,tuple$<> >,tuple$<> >
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\core\src\ops\function.rs:250
  31: std::sys::windows::thread::impl$0::new::thread_start
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\sys\windows\thread.rs:57
  32: BaseThreadInitThunk
  33: RtlUserThreadStart

Additional context
If multigrid is not enabled, it works fine.

@Ontonator Ontonator added the bug Something isn't working label Nov 17, 2023
@fredizzimo
Copy link
Member

This is a duplicate of #1669.

The original bug in that issue was different and fixed, but since then it has broken in another way and re-opened with this new crash.

@fredizzimo fredizzimo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants