sjbach / lusty

LustyExplorer / LustyJuggler for Vim
http://www.vim.org/scripts/script.php?script_id=1890
257 stars 30 forks source link

"stack level too deep" errors from LustyExplorer #67

Closed gotgenes closed 12 years ago

gotgenes commented 12 years ago

I'm experiencing weird issues with LustyExplorer that give me errors like the following

stack level too deep
(eval):2021:in `push'
(eval):4
(eval):252:in `profile'
(eval):4

I get that one when I do <Leader>vrc, which is a mapping in my .vimrc defined as

:nnoremap <Leader>vrc :e $MYVIMRC<CR>

Sometimes when quitting a file I will get a shorter error message of "stack level too deep"

If I move lusty-explorer.vim to lusty-explorer.vim.bak, the issue disappears.

I can also get these errors by opening the explorer and repeatedly pressing the left and right keys:

stack level too deep
(eval):517:in `key_pressed'
(eval):842:in `key_pressed'
(eval):4
(eval):252:in `profile'
(eval):4
sjbach commented 12 years ago

Hmm, that's very strange -- lusty-explorer.vim should be totally separate from your <Leader>vrc mapping. What operating system / vim version / ruby version are you running? Has this only recently cropped up for you?

sjbach commented 12 years ago

I guess there are BufEnter/BufDelete autocmds that call into Ruby - but none of these functions are recursive, and the call path is shallow, so I'm not sure how we're overloading the stack.

gotgenes commented 12 years ago

I get this error on MacVim 7.3 on OS X 10.6.8 and also Vim 7.3 on Ubuntu 11.10 and compiled from scratch on a CentOS server.

sjbach commented 12 years ago

Thanks. How about the ruby version/s that these are calling into?

gotgenes commented 12 years ago

OS X: Ruby 1.8.7 Ubuntu 11.10: Ruby 1.8.2

The CentOS is Ruby 1.9.3p0 but I'm removing that system from this bug because it has a different bug, complaining of "unknown encoding name - latin1".

Are you able to reproduce this bug? It's not clear to me yet whether I'm isolated here or it's reproducible for others. If I'm alone, perhaps there's a conflicting setting in my Vim configuration? https://github.com/gotgenes/shell-configs

sjbach commented 12 years ago

It's not an error I'm able to produce. Note that if you just want to circumvent lusty-explorer.vim entirely, i.e. you have it synced to your .vim/plugin but don't actually use it, you can set this in your .vimrc:

let g:loaded_lustyexplorer = 1

That should prevent the plugin from being loaded.

gotgenes commented 12 years ago

The LustyExplorer plugin actually looks quite nice, so I'd be interested in having it usable. You suspect it could be a Vim configuration conflict, then?

gotgenes commented 12 years ago

The problem stemmed from a call made to the vim-addon-manager setup function in my .vimrc that was an autocommand

autocmd VimEnter * call SetupVAM()

Changing this to simply

call SetupVAM()

solved the issue for me. I'm not sure exactly what in the interaction gave rise to these problems. I will go ahead and close this issue.

sjbach commented 12 years ago

Thanks for following up. If something similar pops up again, let me know.