ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.45k stars 2.81k forks source link

YcmDiags command generates an error in my config. #4147

Closed byteofsoren closed 1 year ago

byteofsoren commented 1 year ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Disclaimer

First if mods decides that this should not belong here they are free to close, remove or nuke it to orbit, its okay for me.

Second my vimrc contains an error or it is an incompatibility with a other plugin. With this issue I hope to let the core developers know if/when I find my problem what the problem was and let the developers know that this could be an issue with that particular error and perhaps finds a way to do some thing with that in the code. Third, my vimrc is complex and perhaps bloated but I need quite few of those mods for my job, sorry for the mess.

You can find it here Vimrc

Issue Details

After installation of YcM I created a main.c and started typing code. Then I executed the :YcmDiags command and got the following error message:

Diagnostics refreshed
Error detected while processing function <SNR>204_ShowDiagnostics[1]..function <SNR>204_ShowDiagnostics:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/soren/.vim/plugged/YouCompleteMe/python/ycm/youcompleteme.py", line 900, in ShowDiagnostics
    vimsupport.OpenLocationList( focus = True )
  File "/home/soren/.vim/plugged/YouCompleteMe/python/ycm/vimsupport.py", line 496, in OpenLocationList
    vim.command( 'lopen' )
vim.error: Vim(loadview):E788: Not allowed to edit another buffer now
Is that my own fault or is it a problem with Vim?

If I use the ycm_vimrc_minimal then YcmDiags works. So Its my vimrc that causes the problem, but why? I tested to disable each plugin I have in the vimrc but the problem remains.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Mar 21 2023 20:51:42)
Included patches: 1-1420
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       +tcl/dyn
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl/dyn          +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3/dyn       +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby/dyn          +wildignore
+cursorbind        +lua/dyn           +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        +mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lelf -lacl -lattr -lgpm -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/5.36/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm 

Output of YcmDebugInfo

2023-05-09 00:46:34,573 - INFO - Completion config: 50, detailing -1 candiates
2023-05-09 00:46:34,573 - INFO - Completion config: 50, detailing -1 candiates
2023-05-09 00:46:34,573 - INFO - Completion config: 50, detailing -1 candiates
2023-05-09 00:46:34,574 - INFO - Completion config: 50, detailing -1 candiates
127.0.0.1 - - [09/May/2023 00:46:34] "GET /ready HTTP/1.1" 200 4
2023-05-09 00:46:34,634 - INFO - Clangd executable found at /home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin and up to date
2023-05-09 00:46:34,634 - INFO - Using Clangd from /home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd
2023-05-09 00:46:34,634 - INFO - Computed Clangd command: ['/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd', '-header-insertion-decorators=0', '-resource-dir=/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/16.0.0', '-limit-results=500']
2023-05-09 00:46:34,634 - INFO - Completion config: 50, detailing -1 candiates
2023-05-09 00:46:34,634 - INFO - Returning cached Clangd command: ['/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd', '-header-insertion-decorators=0', '-resource-dir=/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/16.0.0', '-limit-results=500']
127.0.0.1 - - [09/May/2023 00:46:34] "GET /signature_help_available?subserver=c HTTP/1.1" 200 23
127.0.0.1 - - [09/May/2023 00:46:34] "POST /event_notification HTTP/1.1" 200 2
2023-05-09 00:46:34,651 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
Traceback (most recent call last):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1756, in wrapper
    rv = callback(*a, **ka)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/watchdog_plugin.py", line 97, in wrapper
    return callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/hmac_plugin.py", line 62, in wrapper
    body = callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 65, in EventNotification
    response_data = getattr( _server_state.GetFiletypeCompleter( filetypes ),
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1884, in OnFileReadyToParse
    self._StartAndInitializeServer( request_data )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1870, in _StartAndInitializeServer
    self._extra_conf_dir = self._GetSettingsFromExtraConf( request_data )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1838, in _GetSettingsFromExtraConf
    module = extra_conf_store.ModuleForSourceFile( request_data[ 'filepath' ] )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 55, in ModuleForSourceFile
    return Load( ModuleFileForSourceFile( filename ) )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 66, in ModuleFileForSourceFile
    if Load( module_file ):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 151, in Load
    if not force and not _ShouldLoad( module_file, is_global ):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 134, in _ShouldLoad
    raise UnknownExtraConf( module_file )
ycmd.responses.UnknownExtraConf: Found /home/soren/tmp/udmy/esp32_udemy/.ycm_extra_conf.py. Load? 

(Question can be turned off with options, see YCM docs)
127.0.0.1 - - [09/May/2023 00:46:34] "POST /event_notification HTTP/1.1" 500 2647
127.0.0.1 - - [09/May/2023 00:46:34] "POST /semantic_completion_available HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:46:35] "POST /load_extra_conf_file HTTP/1.1" 200 4
2023-05-09 00:46:35,646 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
2023-05-09 00:46:35,646 - INFO - Starting Clangd: ['/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd', '-header-insertion-decorators=0', '-resource-dir=/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/16.0.0', '-limit-results=500']
2023-05-09 00:46:35,648 - INFO - Clangd started with PID 872864
127.0.0.1 - - [09/May/2023 00:46:35] "POST /event_notification HTTP/1.1" 200 2
2023-05-09 00:46:35,655 - INFO - cfamily: Language server does not require resolve request
2023-05-09 00:46:35,655 - INFO - cfamily: Language server requires sync type of Incremental
2023-05-09 00:46:35,655 - INFO - cfamily: Using characters for signature triggers: (,),{,},<,>,,
127.0.0.1 - - [09/May/2023 00:46:35] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:46:35] "POST /receive_messages HTTP/1.1" 200 701
2023-05-09 00:46:44,269 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
127.0.0.1 - - [09/May/2023 00:46:44] "POST /event_notification HTTP/1.1" 200 625
127.0.0.1 - - [09/May/2023 00:46:45] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:46:58] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:08] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:18] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:28] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:38] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:48] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:47:58] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:09] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:19] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:29] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:39] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:49] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:48:59] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:09] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:19] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:29] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:39] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:49] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:49:59] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:50:10] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:50:20] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:50:30] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:50:40] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:50:50] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:00] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:10] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:20] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:30] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:40] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:51:50] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:00] "POST /debug_info HTTP/1.1" 200 853
127.0.0.1 - - [09/May/2023 00:52:00] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:10] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:16] "POST /receive_messages HTTP/1.1" 200 5
127.0.0.1 - - [09/May/2023 00:52:21] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:29] "POST /debug_info HTTP/1.1" 200 853
127.0.0.1 - - [09/May/2023 00:52:31] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:41] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:52:41] "POST /debug_info HTTP/1.1" 200 853
2023-05-09 00:52:51,107 - INFO - Found executeCommandProvider support for command ExecuteCommand in cfamily
2023-05-09 00:52:51,107 - INFO - Found codeActionProvider support for command FixIt in cfamily
2023-05-09 00:52:51,107 - INFO - Found definitionProvider support for command GoToDefinition in cfamily
2023-05-09 00:52:51,107 - INFO - Found declarationProvider support for command GoToDeclaration in cfamily
2023-05-09 00:52:51,107 - INFO - Found ('definitionProvider', 'declarationProvider') support for command GoTo in cfamily
2023-05-09 00:52:51,107 - INFO - Found typeDefinitionProvider support for command GoToType in cfamily
2023-05-09 00:52:51,107 - INFO - Found implementationProvider support for command GoToImplementation in cfamily
2023-05-09 00:52:51,107 - INFO - Found referencesProvider support for command GoToReferences in cfamily
2023-05-09 00:52:51,107 - INFO - Found renameProvider support for command RefactorRename in cfamily
2023-05-09 00:52:51,108 - INFO - Found documentFormattingProvider support for command Format in cfamily
2023-05-09 00:52:51,108 - INFO - Found workspaceSymbolProvider support for command GoToSymbol in cfamily
2023-05-09 00:52:51,108 - INFO - Found documentSymbolProvider support for command GoToDocumentOutline in cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting StopServer for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting RestartServer for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GetDoc for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GetType for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GoToCallees for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GoToCallers for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GetTypeImprecise for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GoToImprecise for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GoToInclude for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GetDocImprecise for cfamily
2023-05-09 00:52:51,108 - INFO - Always supporting GoToAlternateFile for cfamily
127.0.0.1 - - [09/May/2023 00:52:51] "POST /defined_subcommands HTTP/1.1" 200 328
2023-05-09 00:52:51,109 - INFO - Found executeCommandProvider support for command ExecuteCommand in cfamily
2023-05-09 00:52:51,109 - INFO - Found codeActionProvider support for command FixIt in cfamily
2023-05-09 00:52:51,109 - INFO - Found definitionProvider support for command GoToDefinition in cfamily
2023-05-09 00:52:51,109 - INFO - Found declarationProvider support for command GoToDeclaration in cfamily
2023-05-09 00:52:51,109 - INFO - Found ('definitionProvider', 'declarationProvider') support for command GoTo in cfamily
2023-05-09 00:52:51,109 - INFO - Found typeDefinitionProvider support for command GoToType in cfamily
2023-05-09 00:52:51,109 - INFO - Found implementationProvider support for command GoToImplementation in cfamily
2023-05-09 00:52:51,109 - INFO - Found referencesProvider support for command GoToReferences in cfamily
2023-05-09 00:52:51,109 - INFO - Found renameProvider support for command RefactorRename in cfamily
2023-05-09 00:52:51,109 - INFO - Found documentFormattingProvider support for command Format in cfamily
2023-05-09 00:52:51,109 - INFO - Found workspaceSymbolProvider support for command GoToSymbol in cfamily
2023-05-09 00:52:51,109 - INFO - Found documentSymbolProvider support for command GoToDocumentOutline in cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting StopServer for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting RestartServer for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GetDoc for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GetType for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GoToCallees for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GoToCallers for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GetTypeImprecise for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GoToImprecise for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GoToInclude for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GetDocImprecise for cfamily
2023-05-09 00:52:51,109 - INFO - Always supporting GoToAlternateFile for cfamily
Traceback (most recent call last):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/cpp/clangd_completer.py", line 274, in GetDoc
    self.GetHoverResponse( request_data )[ 'value' ] )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 2498, in GetHoverResponse
    raise NoHoverInfoException( NO_HOVER_INFORMATION )
ycmd.completers.language_server.language_server_completer.NoHoverInfoException: No hover information.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1756, in wrapper
    rv = callback(*a, **ka)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/watchdog_plugin.py", line 97, in wrapper
    return callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/hmac_plugin.py", line 62, in wrapper
    body = callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 93, in RunCompleterCommand
    return _JsonResponse( completer.OnUserCommand(
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/completer.py", line 481, in OnUserCommand
    return command( self, request_data, arguments[ 1: ] )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1758, in <lambda>
    lambda self, request_data, args: self.GetDoc( request_data )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/cpp/clangd_completer.py", line 276, in GetDoc
    raise RuntimeError( 'No documentation available.' )
RuntimeError: No documentation available.
127.0.0.1 - - [09/May/2023 00:52:51] "POST /run_completer_command HTTP/1.1" 500 2145
127.0.0.1 - - [09/May/2023 00:52:51] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:53:01] "POST /receive_messages HTTP/1.1" 200 4
2023-05-09 00:53:01,602 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
127.0.0.1 - - [09/May/2023 00:53:01] "POST /event_notification HTTP/1.1" 200 625
127.0.0.1 - - [09/May/2023 00:53:07] "POST /debug_info HTTP/1.1" 200 853
127.0.0.1 - - [09/May/2023 00:53:11] "POST /receive_messages HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 00:53:11] "POST /event_notification HTTP/1.1" 200 2
2023-05-09 00:53:11,815 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
127.0.0.1 - - [09/May/2023 00:53:11] "POST /event_notification HTTP/1.1" 200 625
2023-05-09 00:53:15,891 - INFO - Found executeCommandProvider support for command ExecuteCommand in cfamily
2023-05-09 00:53:15,891 - INFO - Found codeActionProvider support for command FixIt in cfamily
2023-05-09 00:53:15,891 - INFO - Found definitionProvider support for command GoToDefinition in cfamily
2023-05-09 00:53:15,891 - INFO - Found declarationProvider support for command GoToDeclaration in cfamily
2023-05-09 00:53:15,891 - INFO - Found ('definitionProvider', 'declarationProvider') support for command GoTo in cfamily
2023-05-09 00:53:15,891 - INFO - Found typeDefinitionProvider support for command GoToType in cfamily
2023-05-09 00:53:15,891 - INFO - Found implementationProvider support for command GoToImplementation in cfamily
2023-05-09 00:53:15,891 - INFO - Found referencesProvider support for command GoToReferences in cfamily
2023-05-09 00:53:15,891 - INFO - Found renameProvider support for command RefactorRename in cfamily
2023-05-09 00:53:15,891 - INFO - Found documentFormattingProvider support for command Format in cfamily
2023-05-09 00:53:15,891 - INFO - Found workspaceSymbolProvider support for command GoToSymbol in cfamily
2023-05-09 00:53:15,891 - INFO - Found documentSymbolProvider support for command GoToDocumentOutline in cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting StopServer for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting RestartServer for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GetDoc for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GetType for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GoToCallees for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GoToCallers for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GetTypeImprecise for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GoToImprecise for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GoToInclude for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GetDocImprecise for cfamily
2023-05-09 00:53:15,891 - INFO - Always supporting GoToAlternateFile for cfamily
Traceback (most recent call last):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/cpp/clangd_completer.py", line 274, in GetDoc
    self.GetHoverResponse( request_data )[ 'value' ] )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 2498, in GetHoverResponse
    raise NoHoverInfoException( NO_HOVER_INFORMATION )
ycmd.completers.language_server.language_server_completer.NoHoverInfoException: No hover information.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 876, in _handle
    return route.call(**args)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1756, in wrapper
    rv = callback(*a, **ka)
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/watchdog_plugin.py", line 97, in wrapper
    return callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/hmac_plugin.py", line 62, in wrapper
    body = callback( *args, **kwargs )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 93, in RunCompleterCommand
    return _JsonResponse( completer.OnUserCommand(
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/completer.py", line 481, in OnUserCommand
    return command( self, request_data, arguments[ 1: ] )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", line 1758, in <lambda>
    lambda self, request_data, args: self.GetDoc( request_data )
  File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/cpp/clangd_completer.py", line 276, in GetDoc
    raise RuntimeError( 'No documentation available.' )
RuntimeError: No documentation available.
127.0.0.1 - - [09/May/2023 00:53:15] "POST /run_completer_command HTTP/1.1" 500 2145
2023-05-09 00:53:17,204 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c
127.0.0.1 - - [09/May/2023 00:53:17] "POST /event_notification HTTP/1.1" 200 2
127.0.0.1 - - [09/May/2023 00:53:17] "POST /event_notification HTTP/1.1" 200 625
127.0.0.1 - - [09/May/2023 00:53:17] "POST /event_notification HTTP/1.1" 200 2
127.0.0.1 - - [09/May/2023 00:53:17] "POST /receive_messages HTTP/1.1" 200 78
127.0.0.1 - - [09/May/2023 00:56:34] "GET /healthy HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 01:06:34] "GET /healthy HTTP/1.1" 200 4
127.0.0.1 - - [09/May/2023 01:16:34] "GET /healthy HTTP/1.1" 200 4

Output of YcmDiags Already done.

Paste output here

Output of git rev-parse HEAD in YouCompleteMe installation directory

78ba06ef21bfab9835ced9f4ba8ffdac1b975c40

Contents of YCM, ycmd and completion engine logfiles

Reproduce the issue with vim -Nu /path/to/YCM/vimrc_ycm_minimal, which enabled debug logging and other useful diagnostics. Include a link to a gist containing all of the log files listed by :YcmToggleLogs.

OS version, distribution, etc.

Linux

Output of build/install commands

Include link to a gist containing the invocation and entire output of install.py if reporting an installation issue.

puremourning commented 1 year ago

We will need to narrow down what is conflicting.

The typical approach is to "bisect" your vimrc, i.e. comment out the top "half" and see if it goes away, then try the bottom "half" etc.

However, I can provide a hint based on the above. First - it's not YCM that's causing the E881 error, even though it looks like it is. Second, from the error I can see that it's a call to loadview that is causing the error:

Vim(loadview)

YCM does not use :loadview anywhere.

Therefore I suspect what's happening, given the location of :help E881, something has an autocommand that is calling loadview (heinously!) in FileChanged or FileChangedRO autocommand (or something like that). I suggest scanning your plugins for calls to loadview.

Closing as most likely not a YCM bug.

puremourning commented 1 year ago

FWIW this issue seems kind of similar to something I saw reported against vimspector. IIRC it was some plugin that "maximised" windows or something that was recommended by some YouTuber or other for unknowable reasons. Just a hint, I really don't know and without being able to repro, there's little I can do.

byteofsoren commented 1 year ago

I suggest scanning your plugins for calls to loadview.

Found it in my vimrc. I think this code was generated by an old vimrc online generator.

augroup remember_folds
    autocmd!
    autocmd BufWinLeave ?* mkview | filetype detect
    autocmd BufWinEnter ?* silent loadview | filetype detect
augroup END

Thank you @puremourning!

byteofsoren commented 1 year ago

Found a new problem to solve.

 2023-05-10 00:50:14,754 - INFO - Adding buffer identifiers for file: /home/soren/tmp/udmy/esp32_udemy/main/main.c                  13 Traceback (most recent call last):                                                                                                 14   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 876, in _handle                15     return route.call(**args)                                                                                                      16   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1756, in wrapper               17     rv = callback(*a, **ka)                                                                                                        18   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/watchdog_plugin.py", line 97, in wrapper                      19     return callback( *args, **kwargs )                                                                                             20   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/hmac_plugin.py", line 62, in wrapper
 21     body = callback( *args, **kwargs )                                                                                             22   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 65, in EventNotification                   23     response_data = getattr( _server_state.GetFiletypeCompleter( filetypes ),                                                      24   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", lin    e 1884, in OnFileReadyToParse                                                                                                      25     self._StartAndInitializeServer( request_data )                                                                                 26   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", lin    e 1870, in _StartAndInitializeServer                                                                                               27     self._extra_conf_dir = self._GetSettingsFromExtraConf( request_data )                                                          28   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/completers/language_server/language_server_completer.py", lin    e 1838, in _GetSettingsFromExtraConf
 29     module = extra_conf_store.ModuleForSourceFile( request_data[ 'filepath' ] )
 30   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 55, in ModuleForSourceFile
 31     return Load( ModuleFileForSourceFile( filename ) )
 32   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 66, in ModuleFileForSourceFile
 33     if Load( module_file ):
 34   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 151, in Load
 35     if not force and not _ShouldLoad( module_file, is_global ):
 36   File "/home/soren/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/extra_conf_store.py", line 134, in _ShouldLoad
 37     raise UnknownExtraConf( module_file )
 38 ycmd.responses.UnknownExtraConf: Found /home/soren/tmp/udmy/esp32_udemy/.ycm_extra_conf.py. Load?

This is perhaps a problem with my .ycm_extra_conf.py file? Will investigate that to morrow.

puremourning commented 1 year ago

The above is perfectly normal.