deoplete-plugins / deoplete-jedi

deoplete.nvim source for Python
MIT License
588 stars 40 forks source link

Deoplete-jedi causes vim to crash when editing a specific file #239

Closed gtcooke94 closed 4 years ago

gtcooke94 commented 4 years ago

Problem summary

Deoplete-jedi causes vim to crash when editing a certain file. I've got the file to the minimum I could. If I delete any one of these lines, the steps to reproduce below don't cause a crash. It also doesn't crash except when done on the line specified in the reproduction steps (below the def). It does still error if everything is not named a, I just did that to make it even smaller.:

global a
def a(a):
a = a[a]
if a:
    a += a + 2

Expected

Normal completion expected

Environment Information

Provide a minimal init.vim with less than 50 lines (required)

set nocompatible              " be iMproved, required
filetype off                  " required 
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"call vundle#begin('~/some/path/here')
Plugin 'VundleVim/Vundle.vim' 
Plugin 'Shougo/deoplete.nvim'
Plugin 'deoplete-plugins/deoplete-jedi'
call vundle#end()            " required
filetype plugin indent on    " required
let g:deoplete#enable_at_startup = 1
let g:python3_host_prog = '/Users/gcooke/.virtualenvs/neovim/bin/python3'
let g:python_host_prog = '/Users/gcooke/.virtualenvs/neovim2/bin/python2'
call deoplete#custom#source('jedi', 'is_debug_enabled', 1)
call deoplete#enable_logging('DEBUG', '/tmp/deoplete.log')

Generate logfiles if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/nvim-log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc

Then look at and attach the files /tmp/nvim-log_{PID} and /tmp/deoplete.log here.

Steps to reproduce the issue after starting Neovim (required)

  1. Run nvim {script posted above} -u minimal.vimrc
  2. Go to line 2, press o to enter insert mode on the next line (the line below the def)
  3. Type if
  4. A completion window will show briefly, then vim will start showing tons of error messages. I can't exit out of this except by killing my tmux pane.

Screen shot (if possible)

image

Upload the logfile(s)

I'm not seeing the /tmp/nvim-log_{PID} file. deoplete.log

Shougo commented 4 years ago

It is jedi's problem.

I have updated jedi and parso to the latest version, but the error is occurred.

You can disable jedi's errors by g:deoplete#sources#jedi#ignore_errors. Please read the documentation.

Please report it to jedi issue.

Shougo commented 4 years ago

https://github.com/davidhalter/jedi/issues

gtcooke94 commented 4 years ago

Opened issue in Jedi: https://github.com/davidhalter/jedi/issues/1457

Shougo commented 4 years ago

Fixed on master.