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

Error when deoplete installed #168

Closed
michaelmior opened this Issue Apr 11, 2018 · 15 comments

Comments

Projects
None yet
@michaelmior

michaelmior commented Apr 11, 2018

vim often hangs for several seconds when exiting if deoplete installed. I also get the error message below. Not sure if the error is really with gutentags or deoplete but since the error is in gutentags code, I figured I'd start here.

Error detected while processing function deoplete#send_event[1]..deoplete#util#rpcnotify[4]..<SNR>144_notify:
line    9:
E475: Invalid argument: Channel doesn't exist
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>137_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
@justinhoward

This comment has been minimized.

justinhoward commented Apr 12, 2018

I can confirm the same error

  • NVIM v0.2.2
  • Gutentags master (commit 327bd97)

Does not happen on v1.0.0

@Leandros

This comment has been minimized.

Leandros commented Apr 23, 2018

It used to work with an older version of gutentags, since this appeared after I updated my plugins.

@taiansu

This comment has been minimized.

taiansu commented Apr 25, 2018

FWIW, this only happens when I open a ruby file.

@ruipin

This comment has been minimized.

ruipin commented Apr 27, 2018

I seem to get this almost every single time I do a git commit and quickly close vim once it opens to edit the commit message (i.e. I use the default message).

@alok

This comment has been minimized.

alok commented May 2, 2018

@ruipgpinheiro Same here.

@EduardoBorsa

This comment has been minimized.

EduardoBorsa commented May 7, 2018

Same here...

@burgessa23

This comment has been minimized.

burgessa23 commented May 8, 2018

can also repro the git case, seems to also happen when normally editing files too

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented May 9, 2018

It's probably related to issue 167 ?

Can you try to edit this piece of code and add 'detach': 1 to the options dictionary?

@burgessa23

This comment has been minimized.

burgessa23 commented May 11, 2018

@ludovicchabant sorry, where in the dict?

@gkapfham

This comment has been minimized.

gkapfham commented Jun 6, 2018

Hello @ludovicchabant and @burgessa23 and @michaelmior! I can confirm that I am also experiencing this issue when I do a git commit and then edit the commit message in Neovim. Currently, I am using NVIM v0.3.0-dev. I followed @ludovicchabant's instructions and changed the source code of Gutentags in the following fashion. Is this what you had in mind?

    function! gutentags#build_default_job_options(module) abort
        let l:job_opts = {
                    \ 'detach': 1,
                    \'on_exit': function(
                    \    '<SID>nvim_job_exit_wrapper',
                    \    ['gutentags#'.a:module.'#on_job_exit']),
                    \'on_stdout': function(
                    \    '<SID>nvim_job_out_wrapper',
                    \    ['gutentags#default_io_cb']),
                    \'on_stderr': function(
                    \    '<SID>nvim_job_out_wrapper',
                    \    ['gutentags#default_io_cb'])
                    \}
        return l:job_opts
    endfunction

I can confirm that when I make this change to the code I no longer see the error that was causing problems for me. Is this a fix to the problem? I would appreciate any feedback that you can share about the best way to fully resolve this issue. Thanks for your help and your contribution of this great plugin!

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Jun 9, 2018

It's difficult to know if this is the fix at the moment :) The problem with detaching on exit is that if you exit vim and re-open it in the same folder, you'll end up with 2 competing ctags processes trying to scan the same files, and write to the same tags file... which is probably bad.

Issue #167 will be the central place for most "problems on exit in Neovim" from now on, so I'll close this issue and we can keep investigating and figuring out these things over there.

People who want to go back to before we started using the Vim8/Neovim background job API can switch to the vim7 branch in the Gutentags repository.

@gkapfham

This comment has been minimized.

gkapfham commented Jun 13, 2018

Hello @ludovicchabant, I am also tracking issue #167. I thought it best to report here that I am now using the following version of Neovim:

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-TNdxg7/neovim-0.2.2ubuntu2+git201806122018-315b7f8-f2f288d/build/config -I/build/neovim-TNdxg7/neovim-0.2.2ubuntu2+git201806122018-315b7f8-f2f288d/src -I/build/neovim-TNdxg7/neovim-0.2.2ubuntu2+git201806122018-315b7f8-f2f288d/.deps/usr/include -I/usr/include -I/build/neovim-TNdxg7/neovim-0.2.2ubuntu2+git201806122018-315b7f8-f2f288d/build/src/nvim/auto -I/build/neovim-TNdxg7/neovim-0.2.2ubuntu2+git201806122018-315b7f8-f2f288d/build/include
Compiled by buildd@lgw01-amd64-048

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

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

Here is an example of an error that I see in the terminal window if I use Neovim to edit the commit message and then quickly exit Neovim.

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>19_notify:
line    9:
E475: Invalid argument: Channel doesn't exist
Error detected while processing function <SNR>152_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[fix-target-blank 56bf590] Deleting a not-needed word in the software file.
 1 file changed, 1 insertion(+), 1 deletion(-)

I think that this error is similar to the one that started this issue and it is occurring with this newer version of Neovim. So, perhaps it is possible that a newer version does not resolve this tricky issue? Please let me know if you have any updates or if there is anything that I can do to assist in the resolution of this issue.

@ludovicchabant

This comment has been minimized.

Owner

ludovicchabant commented Jun 14, 2018

This looks very similar to #178 ?

@afifsohaili

This comment has been minimized.

afifsohaili commented Jun 28, 2018

This seems to happen when I rebase or commit only, so I added this line:

au FileType gitcommit,gitrebase let g:gutentags_enabled=0

and it works.

@gkapfham

This comment has been minimized.

gkapfham commented Jul 6, 2018

Hello @ludovicchabant and @afifsohaili, I am writing to confirm that I am following @afifsohaili's suggestion and disabling this plugin when editing a gitcommit or gitrebase buffer and also no longer having any problems. Of course, this does not solve any underlying issues, but it makes Neovim more stable for me. Thanks for the suggestion!

joncrawf added a commit to joncrawf/.vim that referenced this issue Aug 3, 2018

Move to vim7 branch of gutentags plugin
The recent versions of the gutentags plugin utilises neovim's async
backend, which currently causes ctag processes not to be escaped
correctly when quiting a file. This commit moves to a branch of
gutentags that doesn't do this:
ludovicchabant/vim-gutentags#168

Signed-off-by: Jon Crawford <jon@joncrawf.com>

FlowFX added a commit to FlowFX/dotfiles that referenced this issue Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment