wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.97k stars 764 forks source link

Black box when using gif's in windows 11 #4657

Closed TechAssistance closed 2 months ago

TechAssistance commented 9 months ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

unknown

WezTerm version

20230712-072601-f4abf8fd

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Similar to this report where we get a black screen when using gif images. Sometimes saving the file again can make things work. But if you save another file in the same directory that the image is in, I had it actually break wezterm. And sometimes it seems that the .gif files just dont work at all. Not sure what's up.

Screenshot 2023-12-10 091705

But when switching to a PNG file it works

Screenshot 2023-12-10 091813

When checking logs I can see this is produced consistently upon every wezterm launch. ERROR wezterm_gui::glyphcache > Unable to move file data to blob manager: Io error in BlobLease: Access is denied. (os error 5)

Here are the file details as well:

Screenshot 2023-12-10 091603

Here are also files I have tested with and get the issue on:

giphy main rah

Not really sure what is up here.

To Reproduce

Save gif on widows system from web (in my case using brave), then add the gif to your config file using the config.background method.

ex: config.background = { { source = { File = {path = 'C:/Users/someuserboi/Pictures/Backgrounds/rah.png', speed = 0.2}} } }

Configuration

local wezterm = require 'wezterm' local mux = wezterm.mux local act = wezterm.action

local config = {} local keys = {} local mouse_bindings = {} local launch_menu = {}

if wezterm.config_builder then config = wezterm.config_builder() end

--- Default config settings config.color_scheme = 'Dracula' config.font = wezterm.font('Hack Nerd Font') config.font_size = 10 config.launch_menu = launch_menu config.default_cursor_style = 'BlinkingBar' config.disable_default_key_bindings = true config.keys = keys config.mouse_bindings = mouse_bindings

mouse_bindings = { { event = { Down = { streak = 3, button = 'Left' } }, action = wezterm.action.SelectTextAtMouseCursor 'SemanticZone', mods = 'NONE', }, }

config.background = { { source = { File = {path = 'C:/Users/someuserboi/Pictures/Backgrounds/giphy.gif', speed = 0.2}} } }

config.default_domain = 'WSL:Ubuntu-22.04'

return config

Expected Behavior

Expect gif to render into wezterm and animate at the set speed

Logs

09:16:43.024 ERROR wezterm_gui::glyphcache > Unable to move file data to blob manager: Io error in BlobLease: Access is denied. (os error 5)

Anything else?

No other context. Apart from this things have been easy to use and understand thus far.

TechAssistance commented 9 months ago

Followed the person who previously had this issue as well and used GIMP to export the file gif. (legit just open it in gimp, export, select loop forever, and export it). AND BOOM IT WORKS!!!

here is the file now working (original attached in init comment: theonetwo

Checked out the file details and did not see anything (at least in windows properties) that shows any difference. Maybe a unicode issue? Not sure exactly what's up but hey, it works now lol. I also dont imagine many ppl tryna do this so feel free to close the issue no harm done on my end over here 👋

Cheers! 🍻

TechAssistance commented 9 months ago

And sure enough after re-launching etc it don't work anymore. Seems super buggy.

gamephreak13 commented 5 months ago

Same issue here. I tried the GIMP export work around and that didn't work.

Running

Windows 10 22H2

Logs

Nothing in logs

Config

Note: I have the correct path in my config | removed for privacy

-- Pull in the wezterm API
local wezterm = require("wezterm")

-- This will hold the configuration.
local config = wezterm.config_builder()

-- This is where you actually apply your config choices

-- Background Image
config.window_background_image = "path\to\animation.gif"

-- and finally, return the configuration to wezterm
return config

Screenshot

Note: I blured out the bar and initial line from console

image

wez commented 2 months ago

Sounds like a similar root cause to https://github.com/wez/wezterm/issues/5422 which is now fixed in main.

It typically takes about an hour before commits are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.

Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.

If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg file on macOS, a .zip file on Windows and an .AppImage file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.

If you are eager and can build from source then you may be able to try this out more quickly.

gamephreak13 commented 2 months ago

Can confirm after updating to nightly as of (07/15/2024) that the GIFs work on Windows 10 22H2 while the application is in focus.

Thank you so much @wez for the stellar support!

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.