mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Toggling float on Neovim Qt causes CLI hang #353
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @midrare on GitHub (Apr 26, 2024).
Describe the bug
When
komorebic toggle-floatis used on a Neovim Qt window, komorebi stops responding tokomomoreiccommands (though it continues managing windows).To Reproduce
Steps to reproduce the behavior:
komorebic toggle-float(works normally)komorebic toggle-float(bug)komorebic state.komorebiccommands are ignored.Expected behavior
komorebiccommands continue working like normal.Operating System
komorebic checkOutputAdditional context
komorebicthrough kanata.Contents of komorebi.json
@LGUG2Z commented on GitHub (Apr 26, 2024):
I'm not able to reproduce this on
master, it's possible that whatever was causing this bug may have been between v0.1.24 and the latest commit.Try grabbing and running the artifacts from the latest
masterbuild: https://github.com/LGUG2Z/komorebi/actions/runs/8802077150@midrare commented on GitHub (Apr 26, 2024):
I tried with latest artifacts but no luck. Also, I forgot to mention I have StartAllBack installed. I uninstalled but this is still occurring.
With more testing this seems unrelated to Neovim. I can induce the bug with any window.
CLI output
~\Downloads\komomorebi\x86_64-pc-windows-msvc\release> ./komorebi 04/25/2024 05:22:37 PM
2024-04-26T00:22:41.688486Z INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-04-26T00:22:41.693035Z INFO komorebi: creating window manager from static configuration file: C:\Users\SHODAN\komorebi.json
2024-04-26T00:22:41.697612Z INFO init: komorebi::window_manager: initialising
2024-04-26T00:22:41.769453Z INFO komorebi::process_command: listening on komorebi.sock
2024-04-26T00:22:45.727322Z INFO process_command{ToggleFloat}:toggle_float:float_window: komorebi::window_manager: floating window
2024-04-26T00:22:45.727463Z INFO process_command{ToggleFloat}:toggle_float:float_window:focus_container{idx=18446744073709551615}: komorebi::workspace: focusing container
2024-04-26T00:22:45.738626Z INFO process_command{ToggleFloat}:toggle_float:update_focused_workspace{follow_focus=false trigger_focus=true}: komorebi::window_manager: updating
2024-04-26T00:22:45.741457Z INFO process_command{ToggleFloat}: komorebi::process_command: processed
2024-04-26T00:22:45.753808Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66924 })}:update_focused_workspace{follow_focus=false trigger_focus=false}: komorebi::window_manager: updating
2024-04-26T00:22:45.756393Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66924 })}: komorebi::process_event: processed: (hwnd: 66924, title: [BUG]: Toggling float on Neovim Qt causes CLI hang · Issue #787 · LGUG2Z/komorebi — Mozilla Firefox, exe: firefox.exe, class: MozillaWindowClass)
2024-04-26T00:22:47.273206Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}:focus_monitor{idx=1}: komorebi::window_manager: focusing monitor
2024-04-26T00:22:47.273366Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}:focus_window{idx=0}: komorebi::container: focusing window
2024-04-26T00:22:47.283989Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}:update_focused_workspace{follow_focus=false trigger_focus=false}: komorebi::window_manager: updating
2024-04-26T00:22:47.287160Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}:focus_window{idx=0}: komorebi::container: focusing window
2024-04-26T00:22:47.287266Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}:focus_container{idx=0}: komorebi::workspace: focusing container
2024-04-26T00:22:47.288115Z INFO process_event{event=FocusChange(SystemForeground, Window { hwnd: 66820 })}: komorebi::process_event: processed: (hwnd: 66820, title: Nushell MSVC, exe: WindowsTerminal.exe, class: CASCADIA_HOSTING_WINDOW_CLASS)
2024-04-26T00:22:50.090398Z INFO process_command{ToggleFloat}:toggle_float:float_window: komorebi::window_manager: floating window
2024-04-26T00:22:50.090547Z INFO process_command{ToggleFloat}:toggle_float:float_window:focus_container{idx=18446744073709551615}: komorebi::workspace: focusing container
2024-04-26T00:22:50.092497Z INFO process_command{ToggleFloat}:toggle_float:update_focused_workspace{follow_focus=false trigger_focus=true}: komorebi::window_manager: updating
2024-04-26T00:22:50.094211Z INFO process_command{ToggleFloat}: komorebi::process_command: processed
2024-04-26T00:22:51.598938Z INFO process_command{ToggleFloat}:toggle_float:unfloat_window: komorebi::window_manager: unfloating window
2024-04-26T00:22:51.599089Z INFO process_command{ToggleFloat}:toggle_float:unfloat_window:focus_window{idx=0}: komorebi::container: focusing window
2024-04-26T00:22:51.599212Z ERROR process_command{ToggleFloat}:toggle_float:unfloat_window: komorebi: panicked at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\alloc\src\collections\vec_deque\mod.rs:1767:9:
index out of bounds panic.file="/rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04\library\alloc\src\collections\vec_deque\mod.rs" panic.line=1767 panic.column=9
@LGUG2Z commented on GitHub (Apr 26, 2024):
@raggi had a fix for something that may have been similar with monocle windows here:
efa562de5cHowever I'm not seeing anything immediately similar in the
toggle_floatcall path 🤔3370e6acc5/komorebi/src/window_manager.rs (L1641)@LGUG2Z commented on GitHub (Apr 26, 2024):
The actual library call that is failing an assertion:
25ef9e3d85/library/alloc/src/collections/vec_deque/mod.rs (L1767)@LGUG2Z commented on GitHub (Apr 26, 2024):
Which leads me to believe this is the offending call: https://github.com/LGUG2Z/komorebi/blob/master/komorebi/src/workspace.rs#L814
@LGUG2Z commented on GitHub (Apr 26, 2024):
@midrare Which layout is this happening with and does it matter which position the window is in (ie. first or last)?
@LGUG2Z commented on GitHub (Apr 26, 2024):
Nevermind, I just reproduced this with the BSP layout when the NeoVim QT window is the only one in the layout!
@LGUG2Z commented on GitHub (Apr 26, 2024):
0b04e3ef93should hopefully address your issue 🤞@midrare commented on GitHub (Apr 26, 2024):
Tested with artifacts from https://github.com/LGUG2Z/komorebi/actions/runs/8841765357 and all appears to be working. Thanks for the quick fix.