zellij-org / zellij

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

Closing a Plugin with worker leads to errors in the logs #2823

Open mfasold opened 1 year ago

mfasold commented 1 year ago

Description

Loading a plugin with a worker, and closing it, will lead to some errors in the log file.

To reproduce, load Zellij with the following configuration:

layout {
    pane size=1 borderless=true {
        plugin location="zellij:tab-bar"
    }
    pane
    pane size=2 borderless=true {
        plugin location="zellij:status-bar"
    }
}
keybinds {
    normal {
        bind "F1" { LaunchOrFocusPlugin "zellij:strider" {
                floating false
                move_to_focused_tab true
            }; }
    }
}

First open the plugin with F1. Then focus the plugin with CTRL-p and right. Then close the pane with CTRL-p x.

The log will contain the following errors:

INFO   |zellij_server::plugins::w| 2023-09-28 16:19:31.831 [wasm      ] [zellij-server/src/plugins/wasm_bridge.rs:198]: Bye from plugin 2
ERROR  |zellij_server::plugins::p| 2023-09-28 16:19:31.834 [async-std/runti] [zellij-server/src/plugins/plugin_worker.rs:72]: Failed to receive worker message on channel: RecvError
ERROR  |zellij_server::plugins::p| 2023-09-28 16:19:31.834 [async-std/runti] [zellij-server/src/plugins/plugin_worker.rs:72]: Failed to receive worker message on channel: RecvError
INFO   |zellij_server::plugins::w| 2023-09-28 16:19:59.057 [wasm      ] [zellij-server/src/plugins/wasm_bridge.rs:198]: Bye from plugin 1
INFO   |zellij_client            | 2023-09-28 16:19:59.058 [main      ] [zellij-client/src/lib.rs:479]: Bye from Zellij!
ERROR  |zellij_server::os_input_o| 2023-09-28 16:19:59.064 [screen    ] [zellij-server/src/os_input_output.rs:856]: Failed to cache resizes: failed to send message to pty writer
ERROR  |zellij_server::os_input_o| 2023-09-28 16:19:59.064 [screen    ] [zellij-server/src/os_input_output.rs:867]: Failed to apply cached resizes: failed to send message to pty writer

Zellij will not crash. :)

Basic information

zellij --version: zellij 0.38.2 uname -av or ver(Windows): Linux ubuntu-4gb-nbg1-1 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

patrick-motard commented 4 months ago

I'm running into this same error.