maralla / validator.vim

Check syntax on the fly asynchronously.
MIT License
213 stars 14 forks source link

Seg fault when saving files using :wq #53

Closed tpoliaw closed 7 years ago

tpoliaw commented 7 years ago

Using :wq to save a file that is being validated causes a segfault:

Vim: Caught deadly signal SEGV
Vim: Finished.

Segmentation fault (core dumped)

The file does appear to have been saved. It doesn't seem to make a difference if there are any changes to the buffer before the save or whether the file exists or not. Saving an empty buffer does not cause it. Using :x or :w then :q doesn't cause the same problem.

I am using vim 8.0 (included patches: 1-46) (I can add the full vim --version if it'd help) on Redhat 6 with python 3.5. I have removed everything from .vimrc except

call plug#start()
Plug 'maralla/validator.vim'
call plug#end()

It seems to only be a problem if the filetype is one that is being checked. :set ft= before saving prevents the segfault.

To reproduce

$: vi /tmp/foo.py
#type anything into buffer (valid python or not) 
:wq<CR>

I have had the same problem for python and sh files but not lua. I do not have any other checkers installed to test.

tpoliaw commented 7 years ago

57 has fixed this for me - will close when it's merged.