Vim Segfaulting без видимой причины

1961
jordelver

Vim время от времени подражает мне во время редактирования, но не совсем понятно, что его вызывает. Я уверен, что у меня есть какой-то сторонний плагин, но я не знаю, какой именно.

Как я могу отследить, что вызывает это?

0

2 ответа на вопрос

3
Ingo Karkat

Often, a binary search where you disable half of your plugins, then only one half of that (when the problem is still there), or the other half (when the problem vanished) lets you get to the problematic script quickly. The same can be done with the configuration in your ~/.vimrc (by commenting out blocks). But for only sporadially appearing problems, that's too cumbersome (you have to work without some of your plugins for long times) and unlikely to succeed (it may take a very long time to properly drill down to the plugin (which you only suspect is the cause)). So, unless you find a way to "force" crashes, this isn't applicable.

I'd try running Vim with logging permanently on:

$ vim -V20vimlog 

It's not guaranteed to capture the last few statements, but you might get lucky.

Apart from that, try updating frequently to the latest development versions of Vim; the problem might have been fixed in the meantime.

Спасибо, последние строки файла журнала показывают функцию, вызывающую сбой, я думаю, поэтому я должен быть в состоянии отследить ее отсюда. Спасибо :) jordelver 10 лет назад 0
-1
chaput

Вы можете использовать команду strace vim

Вы сможете увидеть, какие файлы открывает vim, и больше отладочной информации.