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

vim freezes when using pymode autocomplete #405

Closed
IOAyman opened this issue Mar 24, 2014 · 13 comments
Closed

vim freezes when using pymode autocomplete #405

IOAyman opened this issue Mar 24, 2014 · 13 comments
Labels

Comments

@IOAyman
Copy link
Contributor

IOAyman commented Mar 24, 2014

Vim freezes for like 10 seconds when I press CTRL+Space or when using on_dot_completion + The CPU usage gets 100% too!

And when the dot if finally printed, the cursor gets positioned before it and I get no list displaying the possible auto-completion methodes!

screenshot from 2014-03-24 07 06 26

Using Linux Mint 16 x64

Output of $ vim --version

 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 12 2013 00:23:19)
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without 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      -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
+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: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

Output of :PymodeTroubleshooting

Pymode diagnostic
===================
VIM:704, OS: Linux, multi_byte:1, pymode: 0.7.8b, python: python


VIM python paths:
-----------------
/home/linuxer/.vim/bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint
/home/linuxer/.vim/bundle/python-mode/pymode/libs2
/home/linuxer/.vim/bundle/python-mode/pymode/libs
/home/linuxer/.virtualenvs/learningTwitter/lib/python2.7/site-packages
/home/linuxer/.vim/bundle/python-mode
/usr/local/lib/python2.7/dist-packages/setuptools-1.4.2-py2.7.egg
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/local/lib/python2.7/dist-packages/newrelic-2.10.1.9
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
_vim_path_

Pymode variables:
-------------------
let pymode = 1
let pymode_breakpoint = 1
let pymode_breakpoint_bind = '<Leader>b'
let pymode_doc = 1
let pymode_doc_bind = 'K'
let pymode_folding = 1
let pymode_indent = 1
let pymode_lint = 1
let pymode_lint_checkers = ['pyflakes', 'pep8', 'mccabe']
let pymode_lint_cwindow = 1
let pymode_lint_ignore = ''
let pymode_lint_message = 1
let pymode_lint_on_fly = 1
let pymode_lint_on_write = 1
let pymode_lint_select = ''
let pymode_lint_signs = 1
let pymode_motion = 1
let pymode_options = 1
let pymode_paths = []
let pymode_quickfix_maxheight = 6
let pymode_quickfix_minheight = 3
let pymode_rope = 1
let pymode_run = 1
let pymode_run_bind = '<leader>r'
let pymode_trim_whitespaces = 1
let pymode_virtualenv = 1
let pymode_virtualenv_enabled = '/home/linuxer/.virtualenvs/learningTwitter'
let pymode_virtualenv_path = '/home/linuxer/.virtualenvs/learningTwitter'

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@smeggingsmegger
Copy link

This is probably a duplicate of: #342 See that issue for a workaround.

@IOAyman
Copy link
Contributor Author

IOAyman commented Mar 28, 2014

Thank you.

fixed by let g:pymode_rope_lookup_project = 0

@wesleybowman
Copy link

Putting let g:pymode_rope_lookup_project = 0 in my .vimrc.local doesn't work for me, nor does typing it into the specific file. This makes it impossible to code. Please help.

I fixed it by deleting the .ropeproject/ folder from my home directory. Still lags a bit, but doesn't completely make vim unuseable.

@ssssam
Copy link

ssssam commented Apr 5, 2014

I hit this issue after using python-mode (Which is otherwise awesome!). First time I typed a dot after a module name, Vim froze while apparently doing a stat of every single file in my home directory.

It was enough for me to put:

let g:pymode_rope = 0

in my .vimrc. Setting g:pymode_rope_lookup_project=0 wasn't enough.

I suggest making g:pymode_rope default to 0 until this issue is fixed or worked around.

ssssam added a commit to ssssam/dotfiles that referenced this issue Apr 5, 2014
This appears to be a bug in python-mode / rope. See:

python-mode/python-mode#405 (comment)

I don't really need autocompletion anyway so just disabled this.
@wesleybowman
Copy link

I would recommend deleting ~/.ropeproject/ I haven't had the issue since then.

@sc68cal
Copy link

sc68cal commented Jan 13, 2015

👍 for this fix, I already had the following in my vimrc, but was experiencing this freeze:

let g:pymode_rope_lookup_project = 0
let g:pymode_rope_complete_on_dot = 0

Changing to

@@ -38,6 +37,7 @@ filetype plugin indent on
 " Python preferences
 let g:pymode_rope_lookup_project = 0
 let g:pymode_rope_complete_on_dot = 0
+let g:pymode_rope = 0

Solved the freezing issue.

@thatnerdjosh
Copy link

Any updates on this? It seems that this disables autocomplete

@MadWombat
Copy link

I am having this issue as well. Any word?

@fmv1992
Copy link
Contributor

fmv1992 commented Jul 21, 2016

I'm still have the same issues...

let g:pymode_rope_lookup_project = 0
let g:pymode_rope_complete_on_dot = 0
let g:pymode_rope = 0

this is a workaround but disables autocompletion.

@cmtatro
Copy link

cmtatro commented Sep 21, 2016

I know this is going to sound weird and probably not helpful, but I seem to run into the same issue and 99% of the time it has to do with syntax highlighting working on the files that are being parsed for autocompletion. I have no idea how to write a vim script to shut off syntax highlighting before autocomplete then turn it back on after. But performance wise, It's an estimated 5 mins to .5 secs difference between autocomplete with syntax vs autocomplete without.

Can you try turning off syntax highlighting and trying the autocomplete again.

@stale
Copy link

stale bot commented Feb 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Feb 13, 2018
@stale
Copy link

stale bot commented Mar 6, 2018

Closed due to inactivity.

@stale stale bot closed this as completed Mar 6, 2018
@sentientmachine
Copy link

I got this error, This is from the YouCompleteMe plugin fighting with me rolling my own pythoncomplete.vim scripts. Disable YouCompleteMe and the error goes away.

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

No branches or pull requests

10 participants