Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

When navigating a directory containing Japanese-named files or folders, using the 'j' key to move through the list consistently results in a Segmentation Fault error.

This issue does not occur when the color scheme is set to the built-in default (when no colorscheme is specified in vimrc).

It seems to occur not immediately after starting to move directories, but rather after moving a certain distance.The location of the occurrence is always the same.

It does not ABEND in directories that only contain the name of the directory where it occurs.

1 Answer

0 votes
by

Could be some kind of broken encoding which doesn't get processed meaningfully.

Please provide example directory name which causes the issue to manifest. I doubt that's any Japanese text will do, because I can open/edit a file with a Japanese name.

by

The character "あ" (U+3042):
UTF-8: 3 bytes (E3 81 82)
UTF-16: 2 bytes (3042)
d tput lines
21
$ tput cols
419

:vsp mode
OK multi byte characters(51)
あああああああああああああああああああああああああああああああああああああああああああああああああああ
NG multi byte characters(52)
ああああああああああああああああああああああああああああああああああああああああああああああああああああ

OK ASCII characters(7) + multi byte characters(51)
0000000あああああああああああああああああああああああああああああああああああああああああああああああああああ
NG ASCII characters(8) + multi byte characters(51)
00000000あああああああああああああああああああああああああああああああああああああああああああああああああああ

OK multi byte characters(51) + ASCII characters(8)
あああああああああああああああああああああああああああああああああああああああああああああああああああ00000000

OK? multi byte characters(51) + ASCII characters(204) 255Characters
The directory is displayed correctly in the list view, but when pressing the Enter key, the following error dialog appears.
Destination doesn't exist or isn't directory
あああああああああああああああああああああああああああああああああああああああああああああああああああ000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

:only mode
OK multi byte characters(52)
ああああああああああああああああああああああああああああああああああああああああああああああああああああ

by

Thank you, I haven't seen a segfault so far, but I do get Destination doesn't exist or isn't directory and link doesn't exist. It might be related to file name length rather than the encoding, although I haven't looked too closely yet.

by

I saw some segfaults and believe it to be the same as in https://github.com/vifm/vifm/issues/1067, so that should be gone in the next release.

As for previewing/openning long paths, haven't been able to make it work so far. I expected the use of \\?\ prefix (as per docs) to solve this, but see no difference.

...