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

Attaching resurrection session crashes #3151

Open
codezninja opened this issue Feb 20, 2024 · 17 comments
Open

Attaching resurrection session crashes #3151

codezninja opened this issue Feb 20, 2024 · 17 comments

Comments

@codezninja
Copy link

1. Attaching an exited session crashes on resurrection

Not sure why this is happening. Tried to debug but couldn't really figure out where I'm having the issues. Any help or guidance would be appreciated

ERROR  |zellij::sessions         | 2024-02-19 20:37:20.973 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:20.975 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:20.975 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:20.975 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:20.976 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:20.976 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.880 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.881 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.881 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.881 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.882 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-02-19 20:37:22.882 [main      ] [src/sessions.rs:56]: Failed to read resurrection layout file: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
INFO   |zellij_client            | 2024-02-19 20:37:22.882 [main      ] [zellij-client/src/lib.rs:159]: Starting Zellij client! 
INFO   |zellij_server            | 2024-02-19 20:37:22.903 [main      ] [zellij-server/src/lib.rs:246]: Starting Zellij server! 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.966 [server_router] [zellij-server/src/route.rs:906]: Server not ready, trying to place instruction in retry queue... 
INFO   |zellij_server            | 2024-02-19 20:37:22.966 [main      ] [zellij-server/src/lib.rs:919]: Compiling plugins using Cranelift 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.966 [server_router] [zellij-server/src/route.rs:998]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.966 [server_router] [zellij-server/src/route.rs:906]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:917]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:998]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:917]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:928]: Server not ready, trying to place instruction in retry queue... 
INFO   |zellij_server::plugins   | 2024-02-19 20:37:22.967 [wasm      ] [zellij-server/src/plugins/mod.rs:149]: Wasm main thread starts 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:998]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.967 [server_router] [zellij-server/src/route.rs:928]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.968 [server_router] [zellij-server/src/route.rs:928]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2024-02-19 20:37:22.968 [server_router] [zellij-server/src/route.rs:998]: Server ready, retrying sending instruction. 
ERROR  |???                      | 2024-02-19 20:37:22.974 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 0 to size (20, 291)
    1: failed to find terminal fd for id 0 
ERROR  |???                      | 2024-02-19 20:37:22.974 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 1 to size (50, 291)
    1: failed to find terminal fd for id 1 
INFO   |zellij_server::plugins::p| 2024-02-19 20:37:23.000 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:495]: Loaded plugin 'tab-bar' from cache folder at '/Users/username/Library/Caches/org.Zellij-Contributors.Zellij' in 10.713417ms 
INFO   |zellij_server            | 2024-02-19 20:37:23.000 [async-std/runti] [zellij-server/src/lib.rs:919]: Compiling plugins using Cranelift 
ERROR  |???                      | 2024-02-19 20:37:23.005 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 0 to size (20, 291)
    1: failed to find terminal fd for id 0 
ERROR  |???                      | 2024-02-19 20:37:23.005 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 1 to size (50, 291)
    1: failed to find terminal fd for id 1 
INFO   |zellij_server::plugins::p| 2024-02-19 20:37:23.013 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:495]: Loaded plugin 'status-bar' from cache folder at '/Users/username/Library/Caches/org.Zellij-Contributors.Zellij' in 23.571333ms 
INFO   |zellij_server            | 2024-02-19 20:37:23.013 [async-std/runti] [zellij-server/src/lib.rs:919]: Compiling plugins using Cranelift 
ERROR  |???                      | 2024-02-19 20:37:23.017 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 0 to size (20, 291)
    1: failed to find terminal fd for id 0 
ERROR  |???                      | 2024-02-19 20:37:23.017 [pty_writer] [zellij-server/src/os_input_output.rs:564]: a non-fatal error occured

Caused by:
    0: failed to set terminal id 1 to size (50, 291)
    1: failed to find terminal fd for id 1 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.462 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [79, 83, 67, 85, 110, 108, 111, 99, 107, 61, 48, 53, 50, 56, 49, 48, 102, 99, 101, 51, 97, 54, 52, 50, 97, 48, 56, 57, 52, 99, 54, 97, 98, 56, 102, 55, 101, 100, 97, 100, 48, 101]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.462 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [68, 105, 114, 61, 47, 85, 115, 101, 114, 115, 47, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.465 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 61, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 80, 97, 116, 104, 61, 47, 111, 112, 116, 47, 104, 111, 109, 101, 98, 114, 101, 119, 47, 67, 101, 108, 108, 97, 114, 47, 98, 97, 115, 104, 47, 53, 46, 50, 46, 50, 54, 47, 98, 105, 110, 47, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [80, 73, 68, 61, 56, 55, 50, 49, 57]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [69, 120, 105, 116, 67, 111, 100, 101, 61, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [84, 84, 89, 61, 47, 100, 101, 118, 47, 116, 116, 121, 115, 48, 48, 49]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [76, 111, 103, 61]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:25.466 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [85, 115, 101, 114, 61, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.801 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [79, 83, 67, 85, 110, 108, 111, 99, 107, 61, 56, 99, 53, 54, 51, 56, 48, 102, 57, 98, 51, 99, 52, 98, 100, 51, 98, 101, 57, 100, 56, 50, 49, 53, 55, 101, 100, 50, 48, 53, 51, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.802 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [68, 105, 114, 61, 47, 85, 115, 101, 114, 115, 47, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.802 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 61, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.802 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 80, 97, 116, 104, 61, 47, 111, 112, 116, 47, 104, 111, 109, 101, 98, 114, 101, 119, 47, 67, 101, 108, 108, 97, 114, 47, 98, 97, 115, 104, 47, 53, 46, 50, 46, 50, 54, 47, 98, 105, 110, 47, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.803 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [80, 73, 68, 61, 56, 55, 53, 51, 50]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.803 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [69, 120, 105, 116, 67, 111, 100, 101, 61, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.803 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [84, 84, 89, 61, 47, 100, 101, 118, 47, 116, 116, 121, 115, 48, 48, 49]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.803 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [76, 111, 103, 61]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.803 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [85, 115, 101, 114, 61, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.805 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [79, 83, 67, 76, 111, 99, 107, 61, 56, 99, 53, 54, 51, 56, 48, 102, 57, 98, 51, 99, 52, 98, 100, 51, 98, 101, 57, 100, 56, 50, 49, 53, 55, 101, 100, 50, 48, 53, 51, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:27.805 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [80, 114, 101, 69, 120, 101, 99]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [79, 83, 67, 85, 110, 108, 111, 99, 107, 61, 100, 53, 102, 49, 102, 51, 102, 100, 101, 51, 98, 55, 52, 53, 50, 55, 56, 101, 56, 55, 100, 53, 99, 97, 51, 57, 52, 55, 57, 101, 99, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [68, 105, 114, 61, 47, 85, 115, 101, 114, 115, 47, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 61, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [83, 104, 101, 108, 108, 80, 97, 116, 104, 61, 47, 111, 112, 116, 47, 104, 111, 109, 101, 98, 114, 101, 119, 47, 67, 101, 108, 108, 97, 114, 47, 98, 97, 115, 104, 47, 53, 46, 50, 46, 50, 54, 47, 98, 105, 110, 47, 98, 97, 115, 104]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [80, 73, 68, 61, 56, 55, 56, 52, 52]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [69, 120, 105, 116, 67, 111, 100, 101, 61, 48]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.714 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [84, 84, 89, 61, 47, 100, 101, 118, 47, 116, 116, 121, 115, 48, 48, 49]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.715 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [76, 111, 103, 61]] 
WARN   |zellij_server::panes::gri| 2024-02-19 20:37:30.715 [screen    ] [zellij-server/src/panes/grid.rs:2431]: Unhandled osc: [[54, 57, 55], [85, 115, 101, 114, 61, 101, 122, 98, 111, 110, 46, 106, 97, 99, 111, 98]] 
INFO   |zellij_server::plugins   | 2024-02-19 20:37:33.574 [wasm      ] [zellij-server/src/plugins/mod.rs:393]: wasm main thread exits 
INFO   |zellij_server::plugins::w| 2024-02-19 20:37:33.575 [wasm      ] [zellij-server/src/plugins/wasm_bridge.rs:231]: Bye from plugin 0 
INFO   |zellij_client            | 2024-02-19 20:37:33.576 [main      ] [zellij-client/src/lib.rs:509]: Bye from Zellij! 
ERROR  |zellij_server::os_input_o| 2024-02-19 20:37:33.577 [screen    ] [zellij-server/src/os_input_output.rs:912]: Failed to apply cached resizes: failed to send message to pty writer 
ERROR  |zellij_utils::errors::not| 2024-02-19 20:37:33.578 [screen    ] [zellij-utils/src/errors.rs:632]: Panic occured:
             thread: screen
             location: At zellij-server/src/lib.rs:817:18
             message: Program terminates: a fatal error occured

Caused by:
    0: failed to receive event on channel
    1: receiving on an empty and disconnected channel 
INFO   |zellij_server::plugins::w| 2024-02-19 20:37:33.582 [wasm      ] [zellij-server/src/plugins/wasm_bridge.rs:231]: Bye from plugin 1 
thread 'main' panicked at /private/tmp/d3c642ba-2903-4236-8380-d2d8eed2ffd6/lib/alacritty_terminal/src/grid/storage.rs:98:27:
index out of bounds: the len is 0 but the index is 18446744073709551615
stack backtrace:
0:        0x1052e1e6c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb478ebbfb46e27ce
1:        0x104d3d140 - core::fmt::write::he4d5fa2daff1f531
2:        0x1052df0d8 - std::io::Write::write_fmt::hc5a47a68eba63d9f
3:        0x1052e1c64 - std::sys_common::backtrace::print::h79bd952cc5812e7a
4:        0x1052e38a8 - std::panicking::default_hook::{{closure}}::h82301f6222887737
5:        0x1052e35a4 - std::panicking::default_hook::h1e49abbb3f1d7dbf
6:        0x1052e3ea4 - std::panicking::rust_panic_with_hook::h1e70c5d905e30e9d
7:        0x1052e3c80 - std::panicking::begin_panic_handler::{{closure}}::h399e32952efd26a4
8:        0x1052e2304 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ab87f841a2323e7
9:        0x1052e3a1c - _rust_begin_unwind
10:        0x1054d7650 - core::panicking::panic_fmt::h33e40d2a93cab78f
11:        0x1054d77f0 - core::panicking::panic_bounds_check::h68378bb80e53ac8a
12:        0x104f81768 - alacritty_terminal::grid::resize::<impl alacritty_terminal::grid::Grid<T>>::resize::h8bd34ea505a21261
13:        0x104f84cb8 - alacritty_terminal::term::Term<T>::resize::ha0aaecaf84bf7682
14:        0x104e4c828 - figterm::figterm_main::{{closure}}::h4b81f75c64e6976e
15:        0x104e29f90 - tokio::runtime::park::CachedParkThread::block_on::h4b6a88d765ca8c0e
16:        0x104ef7cb8 - tokio::runtime::runtime::Runtime::block_on::hef11930b73b0e872
17:        0x104f4b8a0 - figterm::main::h610d1c0004534a9b
18:        0x104f36b48 - std::sys_common::backtrace::__rust_begin_short_backtrace::hfd0bee6d0cebcb06
19:        0x104f36c54 - std::rt::lang_start::{{closure}}::h09acf77d16c5e32e
20:        0x1052d7fc8 - std::rt::lang_start_internal::hf4f3eb1e51305b96
21:        0x104f4d5a0 - _main

Basic information

zellij --version: zellij 0.39.2

stty size: 77 293

uname -av: Darwin CAI-DV79TYW21P 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64

Further information

Reproduction steps, noticeable behavior, related issues, etc

2. Issues with the Zellij UI / behavior / crash

  • Create new session with zellij
  • Exit the session
  • Attach session to resurrect

Issue description

Minimal reproduction

Other relevant information

@aboqasem
Copy link

aboqasem commented May 23, 2024

Hello, have you figured anything out regarding this issue?

Both "run" and "drop to shell" fail with the same error.

@imsnif
Copy link
Member

imsnif commented May 23, 2024

Could you share the contents of the resurrection layout?

It should be in the cache folder (on mac I think it's ~/Library/Caches/org.Zellij-Contributors.Zellij/<zellij-version>/session-info/<session-name>/session-layout.kdl)

@aboqasem
Copy link

aboqasem commented May 23, 2024

Mine is:

layout {
    cwd "/Users/Mohammad.Alzouabi1/dev"
    tab name="Tab #1" focus=true hide_floating_panes=true {
        pane size=1 borderless=true {
            plugin location="zellij:tab-bar"
        }
        pane command="/usr/local/Cellar/zsh/5.9/bin/zsh" focus=true {
            start_suspended true
        }
        pane size=2 borderless=true {
            plugin location="zellij:status-bar"
        }
    }
    new_tab_template {
        pane size=1 borderless=true {
            plugin location="tab-bar"
        }
        pane
        pane size=2 borderless=true {
            plugin location="status-bar"
        }
    }
    swap_tiled_layout name="vertical" {
        tab max_panes=5 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane split_direction="vertical" {
                    pane
                    pane {
                        children
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
        tab max_panes=8 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane split_direction="vertical" {
                    pane {
                        children
                    }
                    pane {
                        pane
                        pane
                        pane
                        pane
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
        tab max_panes=12 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane split_direction="vertical" {
                    pane {
                        children
                    }
                    pane {
                        pane
                        pane
                        pane
                        pane
                    }
                    pane {
                        pane
                        pane
                        pane
                        pane
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
    }
    swap_tiled_layout name="horizontal" {
        tab max_panes=5 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane
                pane
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
        tab max_panes=8 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane {
                    pane split_direction="vertical" {
                        children
                    }
                    pane split_direction="vertical" {
                        pane
                        pane
                        pane
                        pane
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
        tab max_panes=12 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane {
                    pane split_direction="vertical" {
                        children
                    }
                    pane split_direction="vertical" {
                        pane
                        pane
                        pane
                        pane
                    }
                    pane split_direction="vertical" {
                        pane
                        pane
                        pane
                        pane
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
    }
    swap_tiled_layout name="stacked" {
        tab min_panes=5 {
            pane size=1 borderless=true {
                plugin location="tab-bar"
            }
            pane {
                pane split_direction="vertical" {
                    pane
                    pane stacked=true {
                        children
                    }
                }
            }
            pane size=2 borderless=true {
                plugin location="status-bar"
            }
        }
    }
    swap_floating_layout name="staggered" {
        floating_panes 
    }
    swap_floating_layout name="enlarged" {
        floating_panes max_panes=10 {
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 1
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 2
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 3
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 4
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 5
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 6
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 7
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 8
            }
            pane {
                height "90%"
                width "90%"
                x "5%"
                y 9
            }
            pane focus=true {
                height "90%"
                width "90%"
                x 10
                y 10
            }
        }
    }
    swap_floating_layout name="spread" {
        floating_panes max_panes=1 {
            pane {
                x "50%"
                y "50%"
            }
        }
        floating_panes max_panes=2 {
            pane {
                width "45%"
                x "1%"
                y "25%"
            }
            pane {
                width "45%"
                x "50%"
                y "25%"
            }
        }
        floating_panes max_panes=3 {
            pane focus=true {
                height "45%"
                width "45%"
                y "55%"
            }
            pane {
                width "45%"
                x "1%"
                y "1%"
            }
            pane {
                width "45%"
                x "50%"
                y "1%"
            }
        }
        floating_panes max_panes=4 {
            pane {
                height "45%"
                width "45%"
                x "1%"
                y "55%"
            }
            pane focus=true {
                height "45%"
                width "45%"
                x "50%"
                y "55%"
            }
            pane {
                height "45%"
                width "45%"
                x "1%"
                y "1%"
            }
            pane {
                height "45%"
                width "45%"
                x "50%"
                y "1%"
            }
        }
    }
}

@imsnif
Copy link
Member

imsnif commented May 24, 2024

Thanks @aboqasem ! If you copy this layout to some other folder and then try to start Zellij with zellij -l /path/to/this/layout.kdl - do you get the same error?

@aboqasem
Copy link

If you copy this layout to some other folder and then try to start Zellij with zellij -l /path/to/this/layout.kdl - do you get the same error?

Thank you!

zj -l /tmp/session-layout.kdl

Still fails on both:

Screenshot 2024-05-24 at 9 54 24 PM

@imsnif
Copy link
Member

imsnif commented May 24, 2024

Hmm... odd.

If you change this line:

        pane command="/usr/local/Cellar/zsh/5.9/bin/zsh" focus=true {
            start_suspended true
        }

To:

        pane command="zsh" focus=true {
            start_suspended true
        }

Does it work?

How about just to:

        pane

@aboqasem
Copy link

aboqasem commented May 24, 2024

        pane command="zsh" focus=true {
            start_suspended true
        }

Does it work?

Same error.

How about just to:

        pane

This one works.

@imsnif
Copy link
Member

imsnif commented May 25, 2024

Does it work if you change command="zsh" to command="ls"?
If you start zsh on your own (just do zsh in your terminal) does it work?
What do you get for which zsh?

@aboqasem
Copy link

aboqasem commented May 25, 2024

Changing it to ls does run ls.

As for zsh:

Screenshot 2024-05-25 at 3 04 10 PM

Changing command to /usr/local/bin/zsh produces the same error:

Screenshot 2024-05-25 at 3 05 38 PM

bash has a different error:

Screenshot 2024-05-25 at 3 07 36 PM

sh works fine:

Screenshot 2024-05-25 at 3 10 30 PM

@imsnif
Copy link
Member

imsnif commented May 25, 2024

I just want to make sure: this error only happens after you press ENTER, right?

@aboqasem
Copy link

aboqasem commented May 25, 2024

I just want to make sure: this error only happens after you press ENTER, right?

Yes

Screen.Recording.2024-05-25.at.3.14.20.PM.mov

@imsnif
Copy link
Member

imsnif commented May 25, 2024

It looks like we're getting some ANSI instruction inside the terminal that one of our dependencies is hard-crashing on. I'd like to find this instruction and remedy the situation (just to be clear: this does not happen for me with the same setup).

Could you please follow the instructions here (https://github.com/zellij-org/zellij/blob/main/.github/ISSUE_TEMPLATE/bug_report.md#1-graphical-issue-inside-a-terminal-pane-eg-something-does-not-look-as-it-should) and attach the log files? (you can do the stty size when running with sh, then delete the folder contents and recreate this issue)

Thanks!

@aboqasem
Copy link

Could you please follow the instructions here (main/.github/ISSUE_TEMPLATE/bug_report.md#1-graphical-issue-inside-a-terminal-pane-eg-something-does-not-look-as-it-should) and attach the log files? (you can do the stty size when running with sh, then delete the folder contents and recreate this issue)

To be clear, running zellij with zsh without resurrection/-l works fine.

What I should do is:

rm -rf $TMPDIR/zellij-504/zellij-log/

zellij -d # with zsh

stty size # ATTACH result

# wait a few seconds until resurrection layout is created

# CTRL + q

zellij -d -l path/to/resurrection/layout

# Enter
# CTRL + q

# ATTACH $TMPDIR/zellij-504/zellij-log/zellij{,-11}.log

Is it correct?

@imsnif
Copy link
Member

imsnif commented May 25, 2024

You can use the existing resurrection layout, no need to create a new one. And I just need the stty size to know which size terminal to use to read the dumped log file.

But otherwise yes, this is correct.

@aboqasem
Copy link

stty size: 49 216

zellij-11.log

zellij-12.log

zellij.log

@aboqasem
Copy link

aboqasem commented May 25, 2024

Turns out adding just pane will work and respect the cwd setting. So this is the workaround if we want to just use the available shell.

Question:

I am trying to use any of the following:

layout_dir "~/.config/zellij/layouts"
layout_dir "$HOME/.config/zellij/layouts"
layout_dir ".config/zellij/layouts"

But it's not working, you'd have to specify the absolute path. Any way around this? EDIT: there's an open issue reporting the same thing (#2764)

aboqasem added a commit to aboqasem/dotfiles that referenced this issue May 25, 2024
@aboqasem
Copy link

After more trial, just removing start_suspended true solves the issue, i.e:

        pane command="/usr/local/Cellar/zsh/5.9/bin/zsh" cwd="path" size="50%" {
            // start_suspended true
        }
        pane command="/usr/local/Cellar/zsh/5.9/bin/zsh" cwd="path2" focus=true size="50%" {
            // start_suspended true
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants