zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.6k stars 638 forks source link

Zellij crashes when closing tab #2573

Open on3iro opened 1 year ago

on3iro commented 1 year ago

Basic information

zellij --version: 0.37.2 stty size: 45 191 uname -av or ver(Windows): Darwin 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 arm64

Further information When starting a new zellij session and trying to close a tab with <C-x> crashes zellij. v.0.37.0 but is still present in v0.37.2.

(running Alacritty v0.12.1)

Current layout:

layout {
    pane split_direction="vertical" size=1 {
      pane {
        size 30
        borderless true
        name "zentime"
        command "zentime"
        exclude_from_sync true
      }
      pane borderless=true {
          plugin location="zellij:tab-bar"
      }
    }
    pane {
      focus true
      borderless true
    }
    pane size=2 borderless=true {
        plugin location="zellij:status-bar"
    }
}

Error in log:

Caused by:
    0: failed to resize tab vertically
    1: UnsatisfiableConstraint
ERROR  |zellij_utils::errors::not| 2023-06-22 22:31:09.905 [screen    ] [/Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-utils-0.37.2/src/errors.rs:601]: Panic occured:
             thread: screen
             location: At /Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.37.2/src/lib.rs:761:18
             message: Program terminates: a fatal error occured

Caused by:
    failed to write to active terminal for client 1 - msg: [13]
INFO   |zellij_server::plugins::w| 2023-06-22 22:31:09.912 [wasm      ] [/Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.37.2/src/plugins/wasm_bridge.rs:194]: Bye from plugin 3
INFO   |zellij_server::plugins::w| 2023-06-22 22:31:09.913 [wasm      ] [/Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.37.2/src/plugins/wasm_bridge.rs:194]: Bye from plugin 1
INFO   |zellij_server::plugins::w| 2023-06-22 22:31:09.914 [wasm      ] [/Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.37.2/src/plugins/wasm_bridge.rs:194]: Bye from plugin 0
INFO   |zellij_server::plugins::w| 2

Backtrace:

RUST_BACKTRACE=1 zellij -s main

Error occurred in server:
  × Thread 'screen' panicked.
  ├─▶ Originating Thread(s)
  │     1. stdin_handler_thread: AcceptInput
  │     2. screen_thread: WriteCharacter
  │
  ├─▶ At /Users/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.37.2/src/lib.rs:761:18
  ╰─▶ Program terminates: a fatal error occured

      Caused by:
          failed to write to active terminal for client 1 - msg: [13]

      Stack backtrace:
         0: __mh_execute_header
         1: __mh_execute_header
         2: __mh_execute_header
         3: __mh_execute_header
         4: __mh_execute_header
         5: __mh_execute_header
         6: __pthread_joiner_wake

      Panic backtrace:
         0: __mh_execute_header
         1: __mh_execute_header
         2: __mh_execute_header
         3: __mh_execute_header
         4: __mh_execute_header
         5: __mh_execute_header
         6: __mh_execute_header
         7: __mh_execute_header
         8: __mh_execute_header
         9: __mh_execute_header
        10: __mh_execute_header
        11: __mh_execute_header
        12: __mh_execute_header
        13: __mh_execute_header
        14: __mh_execute_header
        15: __pthread_joiner_wake
on3iro commented 1 year ago

It seems to be somehow related to this part of my layout (though no particular setting seems to fix it - only commenting it out completely helps):

 pane {
        size 30
        borderless true
        name "zentime"
        command "zentime"
        exclude_from_sync true
      }
taylorthurlow commented 9 months ago

Also having this same issue, here's my entire layout:

layout {
    default_tab_template {
        pane size=1 borderless=true {
            plugin location="zellij:tab-bar"
        }
        children
        pane size=2 borderless=true {
            plugin location="zellij:status-bar"
        }
    }
    tab {
        pane split_direction="vertical" {
            pane {
                split_direction "horizontal"
                size 120

                pane
            }
            pane {
                command "nvim"
                focus true
            }
        }
    }
}