Hi.

Recently i tried to update latest Align.vba in vim and my vim hung.š I found that this was due to the autoopen feature of plugin tagbar during which following command takes place:

/usr/local/bin/ctags -f - --format=2 --excmd=pattern --fields=nksSa --extra= --sort=yes --language-force=vim --vim-kinds=vfacm /home/lyokha/.vim/Align.vba

I tried to issue it in command-line and it hung. The backtrace of the hung command is:

(gdb) bt
#0š 0x00000000004242a5 in parseCommand (line=<optimized out>, line@entry=0xbb6c13 "command (ie. they are left justified, too).") at vim.c:396
#1š 0x0000000000424f90 in parseVimLine (line=0xbb6c13 "command (ie. they are left justified, too).") at vim.c:584
#2š parseVimFile (line=<optimized out>) at vim.c:618
#3š findVimTags () at vim.c:633
#4š 0x000000000041aee7 in createTagsForFile (passCount=1, language=40, fileName=0x7fffbd832f22 "/home/lyokha/.vim/Align.vba") at parse.c:617
#5š createTagsWithFallback (language=40, fileName=0x7fffbd832f22 "/home/lyokha/.vim/Align.vba") at parse.c:639
#6š parseFile (fileName=fileName@entry=0x7fffbd832f22 "/home/lyokha/.vim/Align.vba") at parse.c:666
#7š 0x0000000000413f87 in createTagsForEntry (entryName=0x7fffbd832f22 "/home/lyokha/.vim/Align.vba") at main.c:303
#8š 0x00000000004024c0 in createTagsForArgs (args=0xb68120) at main.c:348
#9š makeTags (args=0xb68120) at main.c:494
#10 main (argc=<optimized out>, argv=<optimized out>) at main.c:562
(gdb) l
391ššš ššš š* Strip off any spaces and options which are part of the command.
392ššš ššš š* These should preceed the command name.
393ššš ššš š*/
394ššš ššš do
395ššš ššš {
396ššš ššš ššš if (isspace ((int) *cp))
397ššš ššš ššš {
398ššš ššš ššš ššš ++cp;
399ššš ššš ššš }
400ššš ššš ššš else if (*cp == '-')
(gdb)
401ššš ššš ššš {
402ššš ššš ššš ššš /*
403ššš ššš ššš ššš š* Read until the next space which separates options or the name
404ššš ššš ššš ššš š*/
405ššš ššš ššš ššš while (*cp && !isspace ((int) *cp))
406ššš ššš ššš ššš ššš ++cp;
407ššš ššš ššš }
408ššš ššš } while ( *cp &&š !isalnum ((int) *cp) );
409ššš
410ššš ššš if ( ! *cp )

Evidently it tries to parse line

"command (ie. they are left justified, too)."

in Align.vba source (the line is not correct vim command of course, but rather some comment or help), and ctags is unable to go over the do-loop with check forš !isalnum() (*cp is '(' here and the pointer never changes).

Btw current release version works fine with it, i suppose it changed after revision r762:

------------------------------------------------------------------------
r762 | dfishburn | 2010-07-28 15:38:19 +0400 (๓า., 28 ษภฬั 2010) | 9 lines

VIM Parser updates for bug 3032253.

Vim parser did not handle an invalid 'command' format and hung".
Now it handles and checks for these formats:
šš command.
šš command!.
šš comma!.
šš comma! ThisIsValid


Cheers, Alexey.