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

halt on exit #178

Open
meijieru opened this Issue May 9, 2018 · 11 comments

Comments

Projects
None yet
6 participants
@meijieru

meijieru commented May 9, 2018

If I open a file in the file system and quit quickly, neovim complains following and halt

Error detected while processing DirChanged Auto commands for "*":
E475: Invalid argument: Channel doesn't exist
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>133_nvim_job_exit_wrapper[1]..gutentags#gtags_cscope#on_job_exit[3]..gutentags#remove_job:
line   22:
E171: Missing :endif

nvim --version generate

NVIM v0.3.0-dev
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector --param ssp-buffer-size=4 -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim-iMIrMh/neovim-0.2.2ubuntu2+git201805062018-ebb1acb-f2f288d/build/config -I/build/neovim-iMIrMh/neovim-0.2.2ubuntu2+git201805062018-ebb1acb-f2f288d/src -I/build/neovim-iMIrMh/neovim-0.2.2ubuntu2+git201805062018-ebb1acb-f2f288d/.deps/usr/include -I/usr/include -I/build/neovim-iMIrMh/neovim-0.2.2ubuntu2+git201805062018-ebb1acb-f2f288d/build/src/nvim/auto -I/build/neovim-iMIrMh/neovim-0.2.2ubuntu2+git201805062018-ebb1acb-f2f288d/build/include
Compiled by buildd@lgw01-amd64-016

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
@mellery451

This comment has been minimized.

mellery451 commented May 9, 2018

I'm seeing the same thing when editing git commit messages, which tend to be short-lived temp files (I think)

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Jun 9, 2018

Ah good to know -- I might have to add a default list of filetype values for which Gutentags should be disabled (right now it only checks buftype... which works for me since I'm mostly using Mercurial, with my Lawrencium Vim plugin, and that does set the buftype for commit messages/status buffers/etc. :) ).

There's a general issue in Neovim right now about exiting while tags generation is running -- see issue #167.

That said, it looks like there might be some other problem here caused by Gutentags and some other plugin interfering with each other. The error you mentioned seems to be raised through something running auto-commands on the DirChanged event, and that's not Gutentags. Do you have any idea what plugin that is, @meijieru ?

@meijieru

This comment has been minimized.

meijieru commented Jun 11, 2018

How could I check the autocmd runned in the process? @ludovicchabant

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Jun 11, 2018

You can type :autocmd DirChanged to see what functions have been registered... usually you'll spot some name of a plugin you recognize in there.

@meijieru

This comment has been minimized.

meijieru commented Jun 13, 2018

output

--- Auto-Commands ---
DirChanged
    *         call rpcnotify(1, "python_chdir", v:event.cwd)
startify  DirChanged
    <buffer=1>
              Startify

maybe startify or neovim itself?

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Jun 14, 2018

Maybe..... (I didn't know startify, thanks for that, it looks interesting :) )

You could try to disable startify... I don't know what that rpcnotify is though... is that Neovim itself? (I don't have it in my copy of Neovim, but I'm still on 0.2.2).

@meijieru

This comment has been minimized.

meijieru commented Jun 14, 2018

Yeah, it used to notify python client that current dir has been changed, which included in neovim 0.3.0

@gkapfham

This comment has been minimized.

gkapfham commented Jun 17, 2018

Hello @ludovicchabant, I am writing to confirm that I also experience this error, specifically seeing this message when I use Neovim to edit a commit message for Git:

Error detected while processing function deoplete#send_event[1]..deoplete#util#rpcnotify[2]..<SNR>20_notify:
line    9:
E475: Invalid argument: Channel doesn't exist
Error detected while processing DirChanged Auto commands for "*":
E475: Invalid argument: Channel doesn't exist
Error detected while processing function deoplete#send_event[1]..deoplete#util#rpcnotify[2]..<SNR>20_notify:
line    9:
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>153_nvim_job_exit_wrapper[1]..gutentags#ctags#on_job_exit[1]..gutentags#remove_job_by_data[2]..gutentags#remove_job:

Here are the details about the version of Neovim:

NVIM v0.3.1-dev
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim-Ll32jb/neovim-0.2.2ubuntu2+git201806142018-c46997a-f2f288d/build/config -I/build/neovim-Ll32jb/neovim-0.2.2ubuntu2+git201806142018-c46997a-f2f288d/src -I/build/neovim-Ll32jb/neovim-0.2.2ubuntu2+git201806142018-c46997a-f2f288d/.deps/usr/include -I/usr/include -I/build/neovim-Ll32jb/neovim-0.2.2ubuntu2+git201806142018-c46997a-f2f288d/build/src/nvim/auto -I/build/neovim-Ll32jb/neovim-0.2.2ubuntu2+git201806142018-c46997a-f2f288d/build/include
Compiled by buildd@lcy01-amd64-016

I am running Neovim on an Ubuntu 16.04 machine. Is there a workaround that you would suggest?

@xiamaz

This comment has been minimized.

xiamaz commented Oct 25, 2018

This issue still exists in the release version of neovim 0.3.1

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Nov 12, 2018

I can't reproduce this bug with Neovim 0.3.1, but I just pushed commit 2689e11 which adds a new g:gutentags_exclude_filetypes options where you could add gitcommit or whatever is the file type of the temporary commit message file. That would prevent Gutentags from doing anything for that kind of buffer.

@stephendolan

This comment has been minimized.

stephendolan commented Dec 4, 2018

@ludovicchabant ,

I'm still getting the error in the original issue description here, even though it seems from #167 that it should be resolved.

My :checkhealth in neovim v0.3.1 returns that everything is okay.

If I open a ruby file, then quickly :wq, I get the following:

Error detected while processing DirChanged Auto commands for "*":
E475: Invalid argument: Channel doesn't exist
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>103_nvim_job_exit_wrapper[1]..gutentags#ctags#on_job_exit[1]..gutentags#remove_job_by_data[2]..gutentags#remove_job:
line   22:
E171: Missing :endif

Neovim version output:

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20180820-47777-1t89t8z/neovim-0.3.1/build/config -I/tmp/neovim-20180820-47777-1t89t8z/neovim-0.3.1/src -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180820-47777-1t89t8z/neovim-0.3.1/build/src/nvim/auto -I/tmp/neovim-20180820-47777-1t89t8z/neovim-0.3.1/build/include
Compiled by brew@HighSierra.local

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.1/share/nvim"

Run :checkhealth for more info

And the output of :autocmd DirChanged:

:autocmd DirChanged
--- Auto-Commands ---
DirChanged
    *         call rpcnotify(3, "python_chdir", v:event.cwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment