You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yazi
Version: 0.4.3 (Arch Linux 2025-01-01)
Debug :false
Triple : x86_64-unknown-linux-gnu (linux-x86_64)
Rustc : 1.83.0 (90b35a62 2024-11-26)
Ya
Version: 0.4.3 (Arch Linux 2025-01-01)
Emulator
Brand.from_env : Some(Ghostty)
Emulator.detect : Emulator { kind: Left(Ghostty), light: false, cell_size: Some((15,30)) }
Emulator.detect_full: Ok(Emulator { kind: Left(Ghostty), light: false, cell_size: Some((15,30)) })
Adapter
Adapter.matches: Kgp
Desktop
XDG_SESSION_TYPE : Some("x11")
WAYLAND_DISPLAY : None
DISPLAY : Some(":0")
SWAYSOCK : None
HYPRLAND_INSTANCE_SIGNATURE: None
WAYFIRE_SOCKET : None
SSH
shared.in_ssh_connection: false
WSL
WSL: false
NVIM
NVIM :false
Neovim version: 0.10.3
Variables
SHELL : Some("/bin/bash")
EDITOR : Some("nvim")
VISUAL : Some("nvim")
YAZI_FILE_ONE : None
YAZI_CONFIG_HOME: None
YAZI_ZOXIDE_OPTS: None
FZF_DEFAULT_OPTS: None
Text Opener
default : Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block-create: Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block-rename: Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
Multiplexers
TMUX : 0
tmux version : No such file or directory (os error 2)
tmux build flags : enable-sixel=Unknown
ZELLIJ_SESSION_NAME: None
Zellij version : No such file or directory (os error 2)
Dependencies
file : 5.46
ueberzugpp : No such file or directory (os error 2)
ffmpeg/ffprobe: 7.1 / 7.1
pdftoppm : 24.12.0
magick : 7.1.1-43
fzf : 0.57.0
fd/fdfind : 10.2.0 / No such file or directory (os error 2)
rg : 14.1.1
chafa : No such file or directory (os error 2)
zoxide : No such file or directory (os error 2)
7z/7zz : 24.09 / No such file or directory (os error 2)
jq : 1.7.1
Clipboard
wl-copy/paste: No such file or directory (os error 2) / No such file or directory (os error 2)
xclip : 0.13
xsel : No such file or directory (os error 2)
Describe the bug
The Url object has a lifetime of some sort and gets destroyed after a while. I'm not sure if this is intended or not, but if it is it should be documented.
Interestingly enough, simply creating a new Url to pass to the skip_single_child_directories fixes the issue, i.e. replacing extracted_items_url with Url(extracted_items_path)here makes everything work fine.
Using a string instead also works just fine, as strings don't seem to have a lifetime.
Yazi's plugin system inherits Rust's ownership and lifetime concepts. All userdata (including Url) are native Rust types that have their own ownership to ensure safe and efficient transfers across different threads, avoiding any memory reallocation overhead.
In this case, the second parameter of manager_emit triggers an ownership transfer. So when a Url is passed as an argument to manager_emit, it is transferred to another thread with zero cost compared to Lua strings.
Currently, documentation about ownership transfer is still missing, but I'll start working on it in the next few days.
With the support of Url objects for inter-thread communication (previously only Lua primitives were supported), documentation about when the Url object is moved is crucial for plugin developers.
Do you have a quick list of the functions that transfer ownership of the Url object?
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
Ghostty 1.0.1-dev+0000000
yazi --debug
outputDescribe the bug
The
Url
object has a lifetime of some sort and gets destroyed after a while. I'm not sure if this is intended or not, but if it is it should be documented.Relevant bug report:
hankertrix/augment-command.yazi#8
Minimal reproducer
There's probably no simple reproduction for this bug.
bad argument #1: userdata has been destructed
if usingenter --no-skip
hankertrix/augment-command.yazi#8 occurs.Anything else?
Interestingly enough, simply creating a new Url to pass to the
skip_single_child_directories
fixes the issue, i.e. replacingextracted_items_url
withUrl(extracted_items_path)
here makes everything work fine.Using a string instead also works just fine, as strings don't seem to have a lifetime.
Checklist
yazi --debug
) input box to the nightly that I triedmv ~/.config/yazi ~/.config/yazi-backup
)The text was updated successfully, but these errors were encountered: