Open Zettexe opened 6 months ago
I add some things I noticed, in case its helpful:
Working:
INFO |zellij_client | 2024-07-08 17:44:48.028 [main ] [zellij-client/src/lib.rs:178]: Starting Zellij client!
INFO |zellij_server | 2024-07-08 17:44:48.032 [main ] [zellij-server/src/lib.rs:284]: Starting Zellij server!
INFO |zellij_server | 2024-07-08 17:44:48.086 [main ] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift
INFO |zellij_server::plugins | 2024-07-08 17:44:48.087 [wasm ] [zellij-server/src/plugins/mod.rs:203]: Wasm main thread starts
WARN |zellij_utils::input::layo| 2024-07-08 17:44:48.088 [wasm ] [zellij-utils/src/input/layout.rs:105]: Overriding plugin alias
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.089 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.094 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.099 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.100 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
INFO |zellij_server::plugins::p| 2024-07-08 17:44:48.110 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:533]: Loaded plugin 'compact-bar' from cache folder at '/home/prada/.cache/zellij' in 9.852545ms
INFO |zellij_server | 2024-07-08 17:44:48.110 [async-std/runti] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.115 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:44:48.116 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Not working:
INFO |zellij_client | 2024-07-08 17:42:22.222 [main ] [zellij-client/src/lib.rs:178]: Starting Zellij client!
INFO |zellij_server | 2024-07-08 17:42:22.225 [main ] [zellij-server/src/lib.rs:284]: Starting Zellij server!
INFO |zellij_server | 2024-07-08 17:42:22.279 [main ] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1037]: Server not ready, trying to place instruction in retry queue...
INFO |zellij_server::plugins | 2024-07-08 17:42:22.280 [wasm ] [zellij-server/src/plugins/mod.rs:203]: Wasm main thread starts
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1138]: Server ready, retrying sending instruction.
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1037]: Server not ready, trying to place instruction in retry queue...
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1037]: Server not ready, trying to place instruction in retry queue...
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1138]: Server ready, retrying sending instruction.
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1037]: Server not ready, trying to place instruction in retry queue...
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1046]: Server not ready, trying to place instruction in retry queue...
WARN |zellij_server::route | 2024-07-08 17:42:22.280 [server_router] [zellij-server/src/route.rs:1138]: Server ready, retrying sending instruction.
WARN |zellij_utils::input::layo| 2024-07-08 17:42:22.282 [wasm ] [zellij-utils/src/input/layout.rs:105]: Overriding plugin alias
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.282 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.287 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.290 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.292 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
INFO |zellij_server::plugins::p| 2024-07-08 17:42:22.302 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:533]: Loaded plugin 'compact-bar' from cache folder at '/home/prada/.cache/zellij' in 8.298075ms
INFO |zellij_server | 2024-07-08 17:42:22.302 [async-std/runti] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.306 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij_utils::input::layo| 2024-07-08 17:42:22.306 [screen ] [zellij-utils/src/input/layout.rs:1088]: Failed to read layout dir: Os { code: 2, kind: NotFound, message: "No such file or directory" }
In my case, I use Contour and an Alacritty mod with Sixel support.
Able to reproduce all mentioned issues, without a cache clear sixels are broken. And they are double height. I'm also using foot.
Let's try to bump this, it should be a simple regression fix. @imsnif seems to be the Sixel God on zellij
My own release bisect shows this breaks with 0.35.0. Anything >= 35 needs a cache clear. I'll dig into which part of the release it was tomorrow.
My gut instinct on the patch in 0.35.0 that may have caused this seems to be right, at 5235407 the tree is fine, 3a0e56a broken. So https://github.com/zellij-org/zellij/pull/2173 looks like the PR that causes the regression.
This also means that you only need a rm ~/.cache/zellij/zellij-stdin-cache-* rather than a full cache/zellij delete.
Looks like the addition of the cache is causing a race condition when sending the ScreenInstruction TerminalPixelDimensions. When it's correctly sent via a retry from send_to_screen_or_retry_queue!
sixels work, however 9 out of 10 times it's not being sent. 10 times out of 10 only one of the expected TerminalPixelDimensions is sent. This frequently hits the fg/bg color resends also.
Will continue to persevere on this but my knowledge of concurrency in Rust is rudimentary.
Had a bit more time to look into this and looks like route_thread_main
is dropping the ScreenInstructions entirely from the retry queue when the retry queue itself is being replayed rather than placing them back on the retry queue. Making the no-brainer-i-don't-know-what-i'm-doing fix causes zellij to hang entirely on startup. Looks like something is keeping a lock during startup and preventing the retry queue from being executed.
Update: No locking just a race condition between session init and the retry queue. Only when session init has completed first do fg/bg/pixel dims get correctly set in the screen.
Okay had a bit more time to look into this and figured out the obvious reason for the hang (infinite loop). Quick re-trail led me to a fix. Will clean up the patch, and create a PR.
thanks @lypanov this is great!!
If anyone has time to test the above PR/branch and confirm the fix locally, please do so!
Basic information
zellij --version
: zellij 0.40.0, zellij 0.40.1stty size
: 76 157uname -av
orver
(Windows): Linux zettnet-desktop 6.1.87 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:18:29 UTC 2024 x86_64 GNU/Linuxzellij.log:
Issue description
v0.40.0 and v0.40.1 are completely unable to render Sixels even if they report as being capable. This is tested in the foot terminal with confirmed working Sixels.
Other relevant information
Additionally I have looked at every version up until v0.31.0 (The version Sixel support was added) and concluded that in every version 0.31.0 -> 0.39.2 Sixels are rendered with twice the height they should and do not get cleared properly as shown in #3173