Vim hangs and consums 24% of CPU

58 views
Skip to first unread message

wolfv

unread,
Jul 1, 2015, 9:14:47 PM7/1/15
to vim...@googlegroups.com
This is a weird bug.

When the attached test_vim.txt file is opened in Vim, and scrolled down to line 372, Vim hangs and consumes 24% of CPU.
This only happens with the attached vimrc and test_vim.txt. All other files I tried work nice with the attached vimrc.

The test_vim.txt file works nice if it is:

* opened in less

* opened in vi

* opened in Vim with the last 7 lines of the attached vimrc commented

The test_vim.txt file also works nice if a blank line is inserted on line 372 like this:

FILE_CONTENT FILE_CONTENT FILE_CONTENT

http://www.linux4windows.com/Articles/linux_concepts_for_beginners5.html

The attached test_vim.txt file is 504 lines long.
I have reproduced the bug by copying lines 360 to line 375 into a new file, but it only hangs for a couple seconds. And does not hang if the last 7 lines of the vimrc are commented.

I am running Vim version 7.4.6.40 on Linux Fedora 22 on hardware Haswell Intel NUC Kit D54250WYK.

Thank you.

test_vim.txt
vimrc.txt

Christian Brabandt

unread,
Jul 2, 2015, 2:12:19 AM7/2/15
to vim...@googlegroups.com
1) Try to reproduce according to the description here:
http://vimhelp.appspot.com/vim_faq.txt.html#faq-2.5

2) I suspect, markdown syntax highlighting is causing this problem for
you.
(since it goes away, if you disable setting the filetype)
You can check with the :syntime command, which pattern is slow
(see :h :syntime) and also you might want to try to switch to the old
re-engine (:set re=1 see :h two-engines), to see if this makes a
difference.
If this is the case, contact the maintainer of the markdown syntax file.
He can likely assist on how to proceed and hopefully fix the syntax
file.

Best,
Christian

Shlomi Fish

unread,
Jul 2, 2015, 3:05:19 AM7/2/15
to vim...@googlegroups.com
Dear wolfv,

On Wed, 1 Jul 2015 18:14:47 -0700 (PDT)
wolfv <wolf...@gmail.com> wrote:

> This is a weird bug.
>
> When the attached test_vim.txt file is opened in Vim, and scrolled down to
> line 372, Vim hangs and consumes 24% of CPU. This only happens with the
> attached vimrc and test_vim.txt. All other files I tried work nice with the
> attached vimrc.
>

I tried running Vim with that .vimrc and that file here (= Mageia Linux x86-64
6), but ran into a problem:

«««
[kdetest@telaviv1 ~]$ gvim test_vim.txt
Error detected while processing /home/kdetest/.vimrc:
line 6:
E117: Unknown function: vundle#begin
line 11:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line 13:
E492: Not an editor command: Bundle 'gabrielelana/vim-markdown'
line 14:
E492: Not an editor command: Plugin 'xolox/vim-misc'
line 15:
E492: Not an editor command: Plugin 'xolox/vim-shell'
line 18:
E117: Unknown function: vundle#end
No protocol specified

E233: cannot open display
E852: The child process failed to start the GUINo protocol specified

Press ENTER or type command to continue
[kdetest@telaviv1 ~]$
»»»

Can you provide a tarball (see
https://en.wikipedia.org/wiki/Tar_%28computing%29 ) with all the necessary files
needed to reproduce it?

> I am running Vim version 7.4.6.40 on Linux Fedora 22 on hardware Haswell
> Intel NUC Kit D54250WYK.
>

Ah , I see - I almost missed this information.

> Thank you.
>


Regards,

Shlomi Fish


--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Selina Mandrake - The Slayer (Buffy parody) - http://shlom.in/selina

Emma Watson may not look too menacing with a wand in her hand. Until she uses
it with great accuracy to poke both your eyes out.
http://www.shlomifish.org/humour/bits/facts/Emma-Watson/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Wolfram Volpi

unread,
Jul 2, 2015, 6:22:27 AM7/2/15
to vim...@googlegroups.com
Shlomi Fish, thanks for the "Error detected while processing /home/kdetest/.vimrc" messages.
So I commented line 13 of the vimrc file:
    Bundle 'gabrielelana/vim-markdown'
And the problem went away.

Christian, you where right, I will contact the maintainer of that markdown syntax file.


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/T7aQkAg_fyM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
It's bad luck to be superstitious.

Wolfram Volpi
telephone: 575-323-1432
e-mail: wolf...@gmail.com

BPJ

unread,
Jul 5, 2015, 3:55:11 PM7/5/15
to vim...@googlegroups.com
Den 2015-07-02 12:22, Wolfram Volpi skrev:
> Shlomi Fish, thanks for the "Error detected while processing
> /home/kdetest/.vimrc" messages.
> So I commented line 13 of the vimrc file:
> Bundle 'gabrielelana/vim-markdown'
> And the problem went away.
>
> Christian, you where right, I will contact the maintainer of that markdown
> syntax file.
>

You may want to try vim-pandoc-syntax with or without vim-pandoc
(and pandoc!) instead. I use them *all the time* without any such
problems.

https://github.com/vim-pandoc/vim-pandoc-syntax
https://github.com/vim-pandoc/vim-pandoc
https://github.com/jgm/pandoc
Reply all
Reply to author
Forward
0 new messages