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 writing codes like "(10**7)." in Ruby #517

Closed
cheuk-fung opened this issue Aug 19, 2013 · 5 comments
Closed

Error detected while writing codes like "(10**7)." in Ruby #517

cheuk-fung opened this issue Aug 19, 2013 · 5 comments

Comments

@cheuk-fung
Copy link

Example:

    (10**7).

Open a new ruby source file and type the example line. After types the ".", vim gives:

Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
Traceback (most recent call last):
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
  File "<string>", line 1, in <module>
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
  File "/home/cheuk-fung/.vim/bundle/YouCompleteMe/autoload/../python/ycm/completers/all/omni_completer.py", line 58, in CandidatesForQueryAsync
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
    query, unused_start_column )
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
  File "/home/cheuk-fung/.vim/bundle/YouCompleteMe/autoload/../python/ycm/completers/completer.py", line 180, in CandidatesForQueryAsync
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
    self.CandidatesForQueryAsyncInner( query, start_column )
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
  File "/home/cheuk-fung/.vim/bundle/YouCompleteMe/autoload/../python/ycm/completers/all/omni_completer.py", line 79, in CandidatesForQueryAsyncInner
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
    items = vim.eval( ''.join( omnifunc_call ) )
Error detected while processing function youcompleteme#Complete..<SNR>79_CompletionsForQuery:
line    7:
vim.error: Vim(ruby):TypeError: no implicit conversion of nil into String
Error detected while processing function youcompleteme#Complete:
line   35:
E171: Missing :endif

My OS (both have this problem):

Linux Ng 3.10.6-2-ARCH #1 SMP PREEMPT Tue Aug 13 09:47:01 CEST 2013 x86_64 GNU/Linux
Linux Ng 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:19:35 UTC 2013 i686 i686 i686 GNU/Linux

And here is the output of vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 13 2013 20:48:15)
Compiled by Arch Linux
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    
+farsi           +mouse_netterm   +syntax          
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2  -D_FORTIFY_SOURCE=2 -I/usr/local/include  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig  -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lnsl   -lacl -lattr -lgpm -ldl  -L/usr/lib -llua -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic   -lruby -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   

I tried some more cases. It seems that this problem only occurred in the case that typing a "." after a parentheses containing the operator "**".

@vheon
Copy link
Contributor

vheon commented Aug 19, 2013

I tried but for me the errors are all related to vim-ruby auto-complete function.

@cheuk-fung
Copy link
Author

@vheon I disabled vim-ruby and vim-rails but it doesn't help..

@vheon
Copy link
Contributor

vheon commented Aug 19, 2013

well vim-ruby is part of the vim runtime

@cheuk-fung
Copy link
Author

Oh, I see..

I disabled YCM and tried again with typing <ctrl+X><ctrl+O> right after "." and then vim detected error (got different output though). Seems that the problem is related to vim-ruby indeed.

I reported this issue to vim-ruby here: vim-ruby/vim-ruby#169

@Valloric
Copy link
Member

Closing as this seems to be a vim-ruby issue.

bijancn pushed a commit to bijancn/YouCompleteMe that referenced this issue Jul 26, 2016
[READY] Bump Boost version to 1.61.0

Closes ycm-core#490.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/517)
<!-- Reviewable:end -->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants