Skip to content
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 upon opening file with fzf #1795

Open
outfrost opened this issue Jul 23, 2020 · 1 comment
Open

Panic upon opening file with fzf #1795

outfrost opened this issue Jul 23, 2020 · 1 comment

Comments

@outfrost
Copy link

outfrost commented Jul 23, 2020

Description of the problem or steps to reproduce

When I use the fzf plugin to open a file, on some files it works fine, while on others it produces a panic. It seems like the code that panics is not in fzf itself. Opening the same file directly (using > open) works fine.

  1. Start micro
  2. > fzf, optionally type a search query, and pick a file
Plugin diff: runtime error: invalid memory address or nil pointer dereference
stack traceback:
        status:41: in function <status:35>
        [G]: in function 'ExecCommand'
        diff:13: in main chunk
        [G]: ?

Press enter to continueMicro encountered an error: runtime.errorString runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:212 (0x55eab506ea1e)
runtime/panic.go:211 (0x55eab506e86d)
github.com/zyedidia/micro/v2/internal/screen/screen.go:105 (0x55eab550b1fe)
github.com/zyedidia/micro/v2/internal/display/statusline.go:186 (0x55eab556f308)
github.com/zyedidia/micro/v2/internal/display/bufwindow.go:697 (0x55eab556ce04)
github.com/zyedidia/micro/v2/internal/display/bufwindow.go:747 (0x55eab556d07d)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:370 (0x55eab55b7cdd)
github.com/zyedidia/micro/v2/cmd/micro/micro.go:347 (0x55eab55b7ae3)
runtime/proc.go:203 (0x55eab505a972)
runtime/asm_amd64.s:1373 (0x55eab5088d21)

It seems a bit random in terms of which files it will panic on, and it changes between runs of micro. Would this be an instability in fzf, or is this an issue somewhere else which I could help debug?

Specifications

Version: 2.0.6
Commit hash: 60846f5
Compiled on July 03, 2020
OS: Manjaro KDE
Terminal: Konsole

@MuratovAS
Copy link

I experimented a little, in the case of using RunTermEmulator, it crashes when calling NewBufferFromFile.
In the case of using RunInteractiveShell, everything is fine.
For now, I will use RunInteractiveShell forcibly.

Specifications
Version: 2.0.10
Commit hash: b976385
OS: Manjaro Sway
Terminal: kitty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants