yazi: Crash when entering or previewing Home
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
wezterm-gui 20231107-082518-f0e3eecb
Yazi version
yazi 0.1.5
Did you try the latest main branch to see if the problem has already been fixed?
Tried, but the problem is still present
Describe the bug
Yazi crashes when entering or previewing home directory with following code:
thread 'tokio-runtime-worker' panicked at library/std/src/sys/unix/time.rs:77:9: assertion failed: tv_nsec >= 0 && tv_nsec
This does not happen further down the tree for example in .config/yazi
I was able to narrow it down to the feat: new reveal command #341 commit, if I’m not mistaken.
Expected Behavior
No crash in home directory.
To Reproduce
Not possible to say, without tracking down what file or else is causing the crash.
Configuration
happens also with no config.
Anything else?
Maybe you can give me further advise to track down the cause.
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 27 (16 by maintainers)
Everything works now, @sxyazi.
Thank you very much again for your superior maintenance!
@Brixy Thank you for your report that helped me discover this potential bug.
I have created a quick fix for it, it should work. https://github.com/sxyazi/yazi/commit/c49bf02ca47fd0d53e69621743c6c2cc5d67cf93
Thank you very much for your assistance in testing, let’s merge it now!
It’s working. I’ll leave the files in my /home untouched as good as I can, to allow possible testing after a Rust-fix. Pretty sure that some ancient dot-file is causing this.
Thanks for your report. After some investigation, it appears to be a Rust bug, https://github.com/rust-lang/rust/issues/108277.
Your issue is similar to https://github.com/zellij-org/zellij/issues/2369, and the root cause is the presence of files with invalid creation times in the
$HOME. In such cases, Rust panics instead of returning an error.The problem arose in this PR due to the inclusion of a performance optimization - parsing time and other meta information prematurely to avoid multiple subsequent parses.
I will attempt to add a
catch_unwindas a “temporary” fix until Rust addresses it.