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

Watcher attempts to index a nil value #848

Closed
jrwrigh opened this issue Aug 2, 2023 · 17 comments · Fixed by #864
Closed

Watcher attempts to index a nil value #848

jrwrigh opened this issue Aug 2, 2023 · 17 comments · Fixed by #864
Labels
bug Something isn't working

Comments

@jrwrigh
Copy link

jrwrigh commented Aug 2, 2023

Description

When opening up unstaged files in fugitive, I'll sometimes see the following error message:

Error executing luv callback:
...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:76: The coroutine failed with this message: ...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:86: attempt to index a nil value
stack traceback:
        ...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua: in function <...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:59>
stack traceback:
        [C]: in function 'error'
        ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:76: in function 'cb'
        ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:113: in function 'callback'
        ...k/packer/start/gitsigns.nvim/lua/gitsigns/subprocess.lua:98: in function <...k/packer/start/gitsigns.nvim/lua/gitsigns/subprocess.lua:86>

It doesn't have a noticeable effect on the buffers as far as I can tell; even the signs in the gutter are still there. It's more just annoying/alarming than anything else.

Looking at the code, it gets caught on this line:

cache[bufnr]:invalidate()

So I assume that it's cache that is the nil value attempting to be indexed. Strangely though, cache is used and indexed in the same function, just a few lines up:

local git_obj = cache[bufnr].git_obj

So somehow cache becomes nil between those two lines, but I can't figure out why. Nor can I recreate the issue with any consistency at the moment. I'll try adding to this issue if I find more information or anymore reason

Neovim version

NVIM v0.9.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3

Operating system and version

Manjaro 23.0.0

Expected behavior

Not have an error throw when diffing files

Actual behavior

I get the error message listed above. I can hit enter, move on, and nothing appears to be wrong.

Steps to reproduce

Can't find a consistent reproducer unfortunately. I basically diff and stage files until the error occurs.

Gitsigns debug messages

run_job: git --version
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --git-dir --abbrev-ref HEAD
signs.init: Using vimfn signs
dprintf: Highlight GitSignsAdd is already defined
dprintf: Highlight GitSignsChange is already defined
dprintf: Highlight GitSignsDelete is already defined
dprintf: Deriving GitSignsChangedelete from GitSignsChange
dprintf: Deriving GitSignsTopdelete from GitSignsDelete
dprintf: Deriving GitSignsUntracked from GitSignsAdd
dprintf: Highlight GitSignsAddNr is already defined
dprintf: Highlight GitSignsChangeNr is already defined
dprintf: Highlight GitSignsDeleteNr is already defined
dprintf: Deriving GitSignsChangedeleteNr from GitSignsChangeNr
dprintf: Deriving GitSignsTopdeleteNr from GitSignsDeleteNr
dprintf: Deriving GitSignsUntrackedNr from GitSignsAddNr
dprintf: Highlight GitSignsAddLn is already defined
dprintf: Highlight GitSignsChangeLn is already defined
dprintf: Deriving GitSignsChangedeleteLn from GitSignsChangeLn
dprintf: Deriving GitSignsUntrackedLn from GitSignsAddLn
dprintf: Deriving GitSignsStagedAdd from GitSignsAdd
dprintf: Deriving GitSignsStagedChange from GitSignsChange
dprintf: Deriving GitSignsStagedDelete from GitSignsDelete
dprintf: Deriving GitSignsStagedChangedelete from GitSignsChangedelete
dprintf: Deriving GitSignsStagedTopdelete from GitSignsTopdelete
dprintf: Deriving GitSignsStagedAddNr from GitSignsAddNr
dprintf: Deriving GitSignsStagedChangeNr from GitSignsChangeNr
dprintf: Deriving GitSignsStagedDeleteNr from GitSignsDeleteNr
dprintf: Deriving GitSignsStagedChangedeleteNr from GitSignsChangedeleteNr
dprintf: Deriving GitSignsStagedTopdeleteNr from GitSignsTopdeleteNr
dprintf: Deriving GitSignsStagedAddLn from GitSignsAddLn
dprintf: Deriving GitSignsStagedChangeLn from GitSignsChangeLn
dprintf: Deriving GitSignsStagedDeleteLn from GitSignsDeleteLn
dprintf: Deriving GitSignsStagedChangedeleteLn from GitSignsChangedeleteLn
dprintf: Could not derive GitSignsStagedTopdeleteLn
dprintf: Deriving GitSignsAddPreview from GitGutterAddLine
dprintf: Deriving GitSignsDeletePreview from GitGutterDeleteLine
dprintf: Highlight GitSignsCurrentLineBlame is already defined
dprintf: Deriving GitSignsAddInline from TermCursor
dprintf: Deriving GitSignsDeleteInline from TermCursor
dprintf: Deriving GitSignsChangeInline from TermCursor
dprintf: Deriving GitSignsAddLnInline from GitSignsAddInline
dprintf: Deriving GitSignsChangeLnInline from GitSignsChangeInline
dprintf: Deriving GitSignsDeleteLnInline from GitSignsDeleteInline
dprintf: Deriving GitSignsDeleteVirtLn from GitGutterDeleteLine
dprintf: Deriving GitSignsDeleteVirtLnInLine from GitSignsDeleteLnInline
dprintf: Deriving GitSignsVirtLnum from GitSignsDeleteVirtLn
attach(1): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
watch_gitdir(1): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
update(1): updates: 1, jobs: 6
update(1): updates: 2, jobs: 6
attach(1): Already attached
update(1): updates: 3, jobs: 6
attach(1): Already attached
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
update(1): updates: 4, jobs: 9
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
update(1): updates: 5, jobs: 12
attach(15): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(17): Attaching (trigger=BufReadPost)
get_buf_path(17): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/blasius.yaml'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
watch_gitdir(15): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
watch_gitdir(17): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
update(17): updates: 6, jobs: 20
update(15): updates: 7, jobs: 20
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(17): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(17): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(17): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
watcher_cb(15): Git dir update: 'index' { rename = true }
watcher_cb(17): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
update(15): updates: 8, jobs: 29
update(1): updates: 9, jobs: 29
update(17): updates: 10, jobs: 29
detach(17): Detached
attach(19): Attaching (trigger=BufReadPost)
get_buf_path(19): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/README.md' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/README.md'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
watch_gitdir(19): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
update(19): updates: 11, jobs: 33
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(19): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(19): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(19): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
watcher_cb(15): Git dir update: 'index' { rename = true }
watcher_cb(19): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
update(15): updates: 12, jobs: 42
update(1): updates: 13, jobs: 42
update(19): updates: 14, jobs: 42
detach(19): Detached
attach(21): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(22): Attaching (trigger=BufReadPost)
get_buf_path(22): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/index.md' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/index.md'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
watch_gitdir(21): Watching git dir
watch_gitdir(22): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
update(22): updates: 15, jobs: 50
update(21): updates: 16, jobs: 50
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(22): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(22): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(22): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
watcher_cb(15): Git dir update: 'index' { rename = true }
watcher_cb(21): Git dir update: 'index' { rename = true }
watcher_cb(22): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
update(15): updates: 17, jobs: 62
update(1): updates: 18, jobs: 62
update(21): updates: 19, jobs: 62
update(22): updates: 20, jobs: 62
detach(22): Detached
attach(24): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(25): Attaching (trigger=BufReadPost)
get_buf_path(25): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/problems/blasius.c' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/problems/blasius.c'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
watch_gitdir(24): Watching git dir
watch_gitdir(25): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
update(24): updates: 21, jobs: 70
update(25): updates: 22, jobs: 70
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(25): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(25): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(25): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
watcher_cb(15): Git dir update: 'index' { rename = true }
watcher_cb(21): Git dir update: 'index' { rename = true }
watcher_cb(24): Git dir update: 'index' { rename = true }
watcher_cb(25): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
update(15): updates: 23, jobs: 85
update(1): updates: 24, jobs: 85
update(24): updates: 25, jobs: 85
update(21): updates: 26, jobs: 85
update(25): updates: 27, jobs: 85
detach(25): Detached
attach(27): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(28): Attaching (trigger=BufReadPost)
get_buf_path(28): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/qfunctions/differential_filter.h' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/qfunctions/differential_filter.h'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/qfunctions/dif
ferential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/qfunctions/dif
ferential_filter.h
watch_gitdir(27): Watching git dir
watch_gitdir(28): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/qfunctions/differential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/qfunctions/differential_filter.h
update(27): updates: 28, jobs: 93
update(28): updates: 29, jobs: 93
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(27): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(28): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(27): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(28): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(27): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(28): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index' { rename = true }
watcher_cb(15): Git dir update: 'index' { rename = true }
watcher_cb(21): Git dir update: 'index' { rename = true }
watcher_cb(24): Git dir update: 'index' { rename = true }
watcher_cb(27): Git dir update: 'index' { rename = true }
watcher_cb(28): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/qfunctions/dif
ferential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/qfunctions/dif
ferential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
detach(28): Detached
attach(30): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(31): Attaching (trigger=BufReadPost)
get_buf_path(31): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/tests-output/blasius_stgtest.yaml' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/tests-output/blasius_stgtest.yaml'

run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/qfunctions/differential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/qfunctions/differential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_stgtest.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_stgtest.yaml
update(15): updates: 30, jobs: 117
update(1): updates: 31, jobs: 117
update(27): updates: 32, jobs: 117
update(24): updates: 33, jobs: 117
update(21): updates: 34, jobs: 117
watch_gitdir(30): Watching git dir
update(28): updates: 35, jobs: 117
watch_gitdir(31): Watching git dir
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/tests-output/blasius_stgtest.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/tests-output/blasius_stgtest.yaml
update(30): updates: 36, jobs: 119
update(31): updates: 37, jobs: 119
watcher_cb(1): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(27): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(30): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(31): Git dir update: 'index.lock' { rename = true } (ignoring)
watcher_cb(1): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(15): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(21): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(24): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(27): Git dir update: 'index.lock' { change = true } (ignoring)
watcher_cb(30): Git dir update: 'index' { rename = true }
watcher_cb(31): Git dir update: 'index' { rename = true }
attach(16): Attaching (trigger=BufReadPost)
attach(16): Non-normal buffer
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/README.md
detach(31): Detached
attach(33): Attaching (trigger=BufReadPost)
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
attach(34): Attaching (trigger=BufReadPost)
get_buf_path(34): Fugitive buffer for file '/home/jrwrigh/software/libCEED/examples/fluids/tests-output/blasius_test.yaml' from path 'fugitive:///home/jrwrigh/software/libCEED/.git//0/examples/fluids/tests-output/blasius_test.yaml'
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 config user.name
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/problems/blasi
us.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/qfunctions/dif
ferential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_stgtest.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_stgtest.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/README.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_test.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/jrwrigh/software/libCEED/examples/fluids/tests-output/b
lasius_test.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/blasius.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/index.md
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/problems/blasius.c
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/qfunctions/differential_filter.h
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/tests-output/blasius_stgtest.yaml
watch_gitdir(33): Watching git dir
watch_gitdir(34): Watching git dir
update(15): updates: 38, jobs: 145
update(1): updates: 39, jobs: 145
update(30): updates: 40, jobs: 145
update(27): updates: 41, jobs: 145
update(24): updates: 42, jobs: 145
update(21): updates: 43, jobs: 145
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/tests-output/blasius_test.yaml
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 --git-dir /home/jrwrigh/software/libCEED/.git show :0:examples/fluids/tests-output/blasius_test.yaml
update(33): updates: 44, jobs: 147
update(34): updates: 45, jobs: 147
cli.run: Running action 'debug_messages' with arguments {}
cli.run: Running action 'debug_messages' with arguments {}
cli.run: Running action 'debug_messages' with arguments {}
cli.run: Running action 'debug_messages' with arguments {}
cli.run: Running action 'debug_messages' with arguments {}
cli.run: Running action 'debug_messages' with arguments {}
@jrwrigh jrwrigh added the bug Something isn't working label Aug 2, 2023
@otrho
Copy link
Contributor

otrho commented Aug 8, 2023

I'm getting this consistently, any time I use Git in a project where I have a file open in Neovim. I can simply open a file and run git status and get the following similar error:

Error executing luv callback:
vim/shared.lua:620: s: expected string, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua:764: in function 'validate'
        vim/shared.lua:620: in function 'endswith'
        ...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:125: in function <...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:110>

It's similar, but perhaps coincidentally related to the above. Either way it's the watcher receiving a nil filename.

Printing the info before this error occurs reveals:

watcher_cb(1): Git dir update: 'nil' { rename = true }

I don't know what a rename of an empty filename means though. I see #823 is about improving the watcher, perhaps this can be resolved there.

Also, I'm running on FreeBSD, so maybe the event manager behaves differently? I've been seeing this for many weeks and it happens every time I use Git with a file open.

This is my temporary fix: otrho@fa1fd99

@lewis6991
Copy link
Owner

This is my temporary fix: otrho@fa1fd99

That fix indicates to me that luv is behaving weirdly. According to https://github.com/luvit/luv/blob/master/docs.md#uvfs_event_startfs_event-path-flags-callback path should always be a string and never nil.

However since it obviously can be nil in some cases, I'd accept this fix in a PR.

@jrwrigh
Copy link
Author

jrwrigh commented Aug 14, 2023

I updated to the latest version (which includes #851), but I'm still running into the same error message. Not sure if a similar "catch" statement makes sense in this case; as mentioned above, the cache[bufnr] is already checked for a nil value earlier in the function, so I don't think this has anything to do with libuv returning a nil rather than string.

@lewis6991
Copy link
Owner

Ah yes, there's a scheduler call before the access which means the buffer may have detached. So to fix this we just need to do a simple buffer check after the scheduler.

@jrwrigh
Copy link
Author

jrwrigh commented Aug 14, 2023

So to fix this we just need to do a simple buffer check after the scheduler.

So basically a copy-paste of this:

if not cache[bufnr] then
-- Very occasionally an external git operation may cause the buffer to
-- detach and update the git dir simultaneously. When this happens this
-- handler will trigger but there will be no cache.
dprint('Has detached, aborting')
return
end

@lewis6991
Copy link
Owner

Sort of yes.

@lewis6991
Copy link
Owner

#854 should address a bunch of latent issues. Let me know if it fixes this one.

@jrwrigh
Copy link
Author

jrwrigh commented Aug 18, 2023

Ok. Next time I run into the issue, I'll try reproducing on the new version.

@lewis6991
Copy link
Owner

I'll close this for now.

@jrwrigh
Copy link
Author

jrwrigh commented Aug 25, 2023

Well, I just ran into the issue, updated the plugin, but it still happens. So those fixes didn't change the behavior.

@lewis6991
Copy link
Owner

Same line number?

@jrwrigh
Copy link
Author

jrwrigh commented Aug 26, 2023

Yep, same exact line numbers. Also verified that the plugin repo actually updated to main as well.

@lewis6991 lewis6991 reopened this Aug 26, 2023
@elan-hwang
Copy link

I'm getting these errors too.
image

@lewis6991
Copy link
Owner

Did another attempt at fixing. Please report any problems.

@jrwrigh
Copy link
Author

jrwrigh commented Sep 7, 2023

I believe that has fixed the issue. Thanks!

@ihasdapie
Copy link

Running into this issue as well as of d195f0c; pops up intermittently when I have a lot of files open. If it's of any relevance I only see this happen when working in a large monorepo.

image

@bitromortac
Copy link

bitromortac commented Jan 19, 2024

This happens to me as well together with fugitive:

  • check out a commit in interactive rebase
  • :G show to display the diff
  • open a diff, which opens the a fugitive temp file
  • :Ge to edit the file -> error
Error executing vim.schedule lua callback: ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:85: The coroutine failed with this message: ...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:69: 
attempt to index a nil value                                                                                                                                                                                    
stack traceback:
        ...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua: in function <...pack/packer/start/gitsigns.nvim/lua/gitsigns/watcher.lua:65>
stack traceback:
        [C]: in function 'error'
        ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:85: in function 'cb'
        ...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:127: in function <...e/pack/packer/start/gitsigns.nvim/lua/gitsigns/async.lua:126>

Repository owner locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
6 participants