Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SystemStackError: (eval):83:in `get_buffer_entity': stack level too deep #95

Closed
zhaocai opened this Issue Jul 30, 2012 · 20 comments

Comments

Projects
None yet
7 participants

zhaocai commented Jul 30, 2012

Get the following error when typing some like File.

Error detected while processing function rubycomplete#Complete:
line   22:
SystemStackError: (eval):83:in `get_buffer_entity': stack level too deep  
Owner

segfault commented Jul 30, 2012

You'll need to provide a bit more info. Preferably a sample file with the issue. Vim version output would also be useful. Currently attempting to complete File. does not crash for me on OSX 10.8, Linux (gentoo) or Windows.

At the moment I assume it's due to the buffer's content.

@segfault segfault was assigned Jul 30, 2012

zhaocai commented Jul 30, 2012

How to reproduce the error?

just about in any ruby file. After any XXX.

Possible Cause

Now I can identify the problem is related to neocomplcache. This error does not showup when I disable neocomplcache.

Mac Info

OSX mountain lion

ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

Vim Version Info

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan  2 2012 17:38:47)
    MacOS X (unix) version
    Included patches: 1-390
    Compiled by Bjorn Winckler <bjorn.winckler@gmail.com>
    Huge version with MacVim GUI.  Features included (+) or not (-):
    +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs
     +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
     +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg +odbeditor
     +path_extra +perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
     -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp
     -xterm_clipboard -xterm_save
     system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
     user exrc file: "$HOME/.exrc"
     system gvimrc file: "$VIM/gvimrc"
     user gvimrc file: "$HOME/.gvimrc"
     system menu file: "$VIMRUNTIME/menu.vim"
     fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
     Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -arch i386 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
     Linking: gcc   -L.    -L.         -arch i386 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon      -lncurses  -liconv -framework Cocoa    -fstack-protector -L/usr/local/lib  -L/System/Library/Perl/5.12/darwin-thread-multi-2level/
     CORE -lperl -lm -lutil -lc -framework Python   -framework Ruby 
     ```

Shougo commented Jul 30, 2012

Hi. I'm neocomplcache author.

Now I can identify the problem is related to neocomplcache. This error does not showup when I disable neocomplcache

No. I think you can reproduce:

File.<C-x><C-o>

But I can't reproduce this error.
I think your ruby interface may be broken.

zhaocai commented Jul 30, 2012

I disabled the following line and File.<C-x><C-o> works fine now

let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\h\w*\|\h\w*::'

Not sure where is the problem?

Shougo commented Jul 30, 2012

I don't know your errors. Because this error is not occurred in my environment.

Shougo commented Jul 30, 2012

My Vim is 7.3.600 in Ubuntu 12.04. In the latest Vim, this issue may be fixed.

zhaocai commented Jul 30, 2012

Thanks! This fixed the error!

@zhaocai zhaocai closed this Jul 30, 2012

Shougo commented Jul 30, 2012

:-)

Hi @zhaocai, what fixed the error? The latest Vim? I got same error on OSX 10.6.

zhaocai commented Aug 13, 2012

@yangyanhao if you do use neocomplcache, try to upgrade to the latest version. you may also disable the global variable let g:neocomplcache_omni_patterns.ruby.

However, if you are not using neocomplcache. I have no answer for that. SystemStackError is reported from ruby when your call stacks are too deep.

Thank you, @zhaocai. I do use neocomplcache. It seems it works fine after I switched from Ruby 1.8.7 to Ruby 1.9.3.

zhaocai commented Aug 14, 2012

@yangyanhao you are welcome. By the way, how do you switch ruby version inside vim! To me, it seem vim always pick the system default ruby.

type ruby puts RUBY_VERSION in the vim command line always return 1.8.7

I mean the default ruby of the system, not the ruby version inside vim.
I am using rvm, so I switched it by "rvm --default use 1.9.3". I am not sure if it affected neocomplcache.

pasela commented Aug 18, 2012

I'm using neocomplcache. I got same error on OSX 10.6.8 and ruby-1.8.7(system default).

It works fine with ruby-1.9.3(rbenv/ruby-build).
I have switched ruby version inside vim by the following methods.

DYLD_FALLBACK_LIBRARY_PATH=$HOME/.rbenv/versions/1.9.3-p194/lib

or

mkdir ~/lib
ln -s ~/.rbenv/versions/1.9.3-p194/lib/libruby.1.9.1.dylib ~/lib
ln -s ~/.rbenv/versions/1.9.3-p194/lib/libyaml.dylib ~/lib

see man dyld

zhaocai commented Aug 18, 2012

@pasela does :ruby puts RUBY_VERSION (not :!ruby puts RUBY_VERSION ) tell you 1.9.3? I tried
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/.rvm/rubies/default/lib and it does not seem to work.

pasela commented Aug 18, 2012

Yes. I got "1.9.3".
I'm using MacVim-KaoriYa(20120509). It has "+ruby/dyn" and "+ruby19/dyn".

zhaocai commented Aug 18, 2012

@pasela I see. The MacVim I use does not have +ruby/dyn" and "+ruby19/dyn".

incorvia commented Sep 1, 2012

I use MVIM version 7.3 build(64).. using ruby version: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0] inside of Vim. I too had this issue. I was the following line in my vimrc:

let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'

This caused many stack level too deep errors such as:

Error detected while processing function rubycomplete#Complete:
line   22:
SystemStackError: (eval):309:in `clean_sel': stack level too deep 

By removing this line from my .vimrc it solved the issue..

Shougo commented Sep 4, 2012

I added g:neocomplcache_force_omni_functions.
If it is set, neocomplcache will call omni function directly.

if !exists('g:neocomplcache_force_omni_patterns')
  let g:neocomplcache_force_omni_patterns = {}
endif
let g:neocomplcache_force_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'

Please check it.

I was getting the stack level too deep errors as well, using vim version 7.3.462, with the system ruby 1.8.7 on OS X 10.8.2, but I was able to fix the problem simply by updating the git submodule for neocomplcache to the most recent version (fyi @Shougo)

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