-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: runtime error: invalid memory address or nil pointer dereference #3890
Comments
It's possible the issue has already been fixed in the current Ref: #3863 If you'd like, you can try downloading the repository, running |
Thanks a lot! Yes, after rebuilding fzf the crash is gone. |
👍
Not able to reproduce with a minimal # my demo .zshrc
export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/Developer/fzf/bin:$PATH"
ZSH_THEME="robbyrussell"
plugins=(fzf)
source $ZSH/oh-my-zsh.sh What is the output for this command ? bindkey | grep -F '^I' Did you source the Any other plugins installed? Try to disable them. |
I made a new user and skipped oh-my-zsh and just did the recommended fzf install method:
copied the newly compiled fzf (without the segmentation fault) to ~/bin |
The output for the fzf-only user is:
For the oh-my-zsh user it is the same. By the way: ctrl-r, ctrl-t and alt-c work always very well (also with original binary file). |
Can you try a # new session
zsh -f
source ~/.fzf/shell/completion.zsh
kill **
# issue still there ? EDIT: The next step would be to try to debug it. zsh -f
source ~/.fzf/shell/completion.zsh
typeset -ft fzf-completion __fzf_defaults __fzf_comprun __fzf_extract_command _fzf_feed_fifo _fzf_complete _fzf_complete_kill _fzf_complete_kill_post
kill **
# share verbose output … |
I'm sorry, a part of this is due to my testing procedure...
If I use:
I get the But this still doesn't solve the original issue with the normal account. |
Can you try the debug snippet with the
The default version of # default 'su' man page under macOS
man =(curl https://raw.githubusercontent.com/apple-oss-distributions/shell_cmds/main/su/su.1) The Footnotes |
Thanks for your help! The first thing to do was to log on to the account without residual environment variables, which stay when using just Then The output with
EDIT: |
The Lines 236 to 244 in cc2b214
Lines 107 to 121 in cc2b214
This command with the input from FZF_DEFAULT_OPTS='--height 40% --bind=ctrl-z:ignore --reverse' \
fzf -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -q '' Are you aware if the Footnotes |
This is all so weird...
A Exactly the same behavior on a different Tumbleweed OS. So, some external tools (which are newer on Tumbleweed) are doing something different? |
The problem can be easily reproduced with a container: The following if the build-file
If you write this to then this will make the container: |
I could find an older executable in a different Tumbleweed, 0.52.0. |
Thanks for the setup. I used Note I never manged to reproduce the issue on my normal macOS version outside of a Docker container. Even after trying with Minimal reproductionDockerfile
brew install --cask docker
docker build --tag opensuse_fzf --file Dockerfile .
docker run --rm --tty --interactive opensuse_fzf:latest /usr/bin/zsh run the function below test_fail() {
PS4='%B%F{0}+ %D{%T:%3.} %2N:%i%f%b '
setopt localoptions xtrace verbose
fifo=$(mktemp -u)
mkfifo "$fifo"
(
echo "Boom" >"$fifo" &
)
matches=$(fzf <"$fifo")
rm -f "$fifo"
}
test_fail output + 03:24:33:752 test_fail:3 fifo=
+ 03:24:33:753 test_fail:3 mktemp -u
+ 03:24:33:752 test_fail:3 fifo=/tmp/tmp.yNSG6LtONw
+ 03:24:33:756 test_fail:4 mkfifo /tmp/tmp.yNSG6LtONw
+ 03:24:33:761 test_fail:8 matches=
+ 03:24:33:762 test_fail:6 echo Boom
+ 03:24:33:762 test_fail:8 fzf
input/output error
+ 03:24:33:761 test_fail:8 matches=''
+ 03:24:33:774 test_fail:9 rm -f /tmp/tmp.yNSG6LtONw Workaround
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -199,9 +199,9 @@ _fzf_dir_completion() {
}
-_fzf_feed_fifo() (
+_fzf_feed_fifo() {
command rm -f "$1"
mkfifo "$1"
- cat <&0 > "$1" &
-)
+ cat <&0 > "$1" &|
+}
_fzf_complete() { Evolution of the error message by
|
@LangLangBart Thanks a lot for the repro. Interestingly, the bash version works fine. ![]() |
I can confirm that it fixes the problem. Do you think we should do this? |
Have not found a satisfactory explanation that justifies the change beyond "it works", and would like to spend more time examining the source code. |
That's a reasonable approach. Possibly related: But if I recall correctly, the reason I used a subshell in |
The inability to reproduce the issue on macOS was due to the If one were to check out revision 102 of the Instructions for Building zsh Revision 102Using Create an account on: build.opensuse.org Create an [general]
apiurl=https://api.opensuse.org
[https://api.opensuse.org]
user=<HERE YOUR NAME>
pass=<HERE YOUR PASSWORD>
credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager
Start building the Docker image and run it with the mount: /var/tmp/build-root/standard-x86_64/.mount/proc: permission denied.
dmesg(1) may have more information after failed mount system call.
Build the # process will take ~5min
osc build
# start the `zsh` session
/var/tmp/build-root/standard-x86_64/usr/bin/zsh -f
# test sourcing and completion with fzf, no issue anymore
source <(fzf --zsh)
kill ** Note FYI: The issue doesn't occur on openSuse Leap (predecessor to openSuse Tumbleweed) because Leap runs a different zsh version ( Alternative solutions to a067458
Footnotes |
@LangLangBart Thank you very much for the great analysis. |
Checklist
man fzf
)Output of
fzf --version
0.53.0 (c4a9ccd)
OS
Shell
Problem / Steps to reproduce
When typing:
kill **
the result is:
The text was updated successfully, but these errors were encountered: