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

Error detected while processing function <SNR>29_PollSemanticHighlighting[1].. #4285

Open
11 of 12 tasks
namniav opened this issue Jan 11, 2025 · 0 comments
Open
11 of 12 tasks

Comments

@namniav
Copy link

namniav commented Jan 11, 2025

Issue Prelude

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

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, using vim -Nu /path/to/YCM/vimrc_ycm_minimal, including what I
    expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

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

Issue Details

Provide a clear description of the problem, including the following key
questions:

  • What did you do?

Normally deleted some lines of particular code and many errors(see below) pops up when semantic highlighting was enabled.

Include steps to reproduce here.

  1. cat test.cpp
#if FOOBAR > 0
# include <foobar>
#endif

int main() {}
  1. vim -Nu /path/to/YCM/ycm_vimrc_minimal test.cpp
  2. :1,4d (Deletes first 4 lines of code with ONE delete operation. Visual-selecting the lines with shift-V then d also works. The last two lines(empty line and main function) are also important to reproduce issue.)

Include description of a minimal test case, including any actual code required
to reproduce the issue.

See above.

If you made changes to vimrc_ycm_minimal, pase them here:

... default minimal template

" Enable semantic highlighting
let g:ycm_enable_semantic_highlighting=1
  • What did you expect to happen?

No error.

  • What actually happened?

Many errors pops up when semantic highlighting was enabled.

Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
  File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
  File "/Users/namniav/.vim/plugged/YouCompleteMe/python/ycm/scrolling_range.py", line 91, in Update
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    self._Draw()
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    ~~~~~~~~~~^^
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
  File "/Users/namniav/.vim/plugged/YouCompleteMe/python/ycm/semantic_highlighting.py", line 134, in _Draw
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    raise e
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
  File "/Users/namniav/.vim/plugged/YouCompleteMe/python/ycm/semantic_highlighting.py", line 124, in _Draw
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    tp.AddTextProperty( self._bufnr, self._prop_id, prop_type, rng )
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
  File "/Users/namniav/.vim/plugged/YouCompleteMe/python/ycm/text_properties.py", line 68, in AddTextProperty
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
    return vim.eval( f"prop_add( { range[ 'start' ][ 'line_num' ] },"
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
           ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Press ENTER or type command to continue
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
                     f"          { range[ 'start' ][ 'column_num' ] },"
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
                     f"          { json.dumps( props ) } )" )
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
vim.error: Vim:E966: Invalid line number: 2
Press ENTER or type command to continue
Error detected while processing function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable[7]..function <SNR>29_PollSemanticHighlighting[1]..<SNR>29_PollScrollable:
line    7:
E858: Eval did not return a valid python object
Press ENTER or type command to continue

Diagnostic data

Output of vim --version

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Dec 02 2024 18:58:51)
macOS version - arm64
Included patches: 1-900
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+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              +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           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      +sodium            -X11
+digraphs          +mouse             +sound             -xattr
-dnd               -mouseshape        +spell             -xfontset
-ebcdic            +mouse_dec         +startuptime       -xim
+emacs_tags        -mouse_gpm         +statusline        -xpm
+eval              -mouse_jsbterm     -sun_workshop      -xsmp
+ex_extra          +mouse_netterm     +syntax            -xterm_clipboard
+extra_search      +mouse_sgr         +tag_binary        -xterm_save
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/homebrew/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -mllvm -enable-constraint-elimination=0 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: clang -o vim -lm -lncurses -lsodium -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -fstack-protector-strong -L/System/Library/Perl/5.34/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13/lib/python3.13/config-3.13-darwin -lpython3.13 -framework CoreFoundation -lruby.3.3 -L/opt/homebrew/Cellar/ruby/3.3.6/lib 

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Resolve completions: Up front
-- Client logfile: /var/folders/kz/4wgytmy56ks64tslrymmc0vw0000gn/T/ycm_hso4g_8q.log
-- Server Python interpreter: /opt/homebrew/opt/[email protected]/bin/python3.13
-- Server Python version: 3.13.1
-- Server has Clang support compiled in: False
-- Clang version: None
-- No extra configuration file found
-- C-family completer debug information:
--   Clangd running
--   Clangd process ID: 7627
--   Clangd executable: ['/Users/namniav/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output/bin/clangd', '-header-insertion-decorators=0', '-resource-dir=/Users/namniav/.vim/plugged/Y
ouCompleteMe/third_party/ycmd/third_party/clang/lib/clang/19.1.0', '-limit-results=500', '-log=verbose']
--   Clangd logfiles:
--     /var/folders/kz/4wgytmy56ks64tslrymmc0vw0000gn/T/clangd_stderrlww5mc0_.log
--   Clangd Server State: Initialized
--   Clangd Project Directory: /private/tmp
--   Clangd Open Workspaces: {'/private/tmp'}
--   Clangd Settings: {}
--   Clangd Compilation Command: False
-- Server running at: http://127.0.0.1:65414
-- Server process ID: 7625
-- Server logfiles:
--   /var/folders/kz/4wgytmy56ks64tslrymmc0vw0000gn/T/ycmd_65414_stdout_k14y_hh9.log
--   /var/folders/kz/4wgytmy56ks64tslrymmc0vw0000gn/T/ycmd_65414_stderr_v38ys5p1.log
-- Semantic highlighting supported: True
-- Virtual text supported: True
-- Popup windows supported: True
Press ENTER or type command to continue

Output of YcmDiags

No warnings or errors detected.

Output of git rev-parse HEAD in YouCompleteMe installation directory

131b1827354871a4e984c1660b6af0fefca755c3

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.
clangd_stderrlww5mc0_.log
ycm_hso4g_8q.log
ycmd_65414_stderr_v38ys5p1.log
ycmd_65414_stdout_k14y_hh9.log

OS version, distribution, etc.

M1 Macbook Air, macOS Sonoma 14.1

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

No branches or pull requests

1 participant