Error: ctags: cannot sort tag file. No such file or directory #187

Closed
jmlucjav opened this Issue Dec 20, 2013 · 6 comments

Projects

None yet

2 participants

@jmlucjav

I upgraded tagbar (and all my other plugins) some days ago and since then tagbar does not show any tag. I saw this in the logs:

Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIAF4B2.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIoF4B3.tmp 2>&1"

what I find odd is that I am editing a .vim file in some other directory, not in C:\Users\jm\AppData\Local\Temp\VIAF4B2.tmp.vim.

Tried updating again today but same issue. My env is vim7.4.103 32b on win7 64b

thanks

@majutsushi
Owner

The strange file is actually normal, Tagbar uses a temporary file for
processing so it can for example show tags for remote files (i.e. opened
with netrw). It would be helpful if I could have a look at the complete
log file, do you have one available that you could post here? Thanks!

@jmlucjav

ah makes sense.

I created my log file by starting vim like this: gvim.exe -V9vimlog.txt

Is this good enough for you? Something else I can do to help? Notice that the error does not show up in the log, the ctags invokation does, but the error does not. I can see it for a couple of seconds before it disappears, I tried with the redir @* trick but to no avail.

@majutsushi
Owner

You can generate a Tagbar-specific debug log file with the :TagbarDebug
command. To use it start Vim, run the command, open a file, open Tagbar
and then quit. This should leave a file tagbardebug.log in the current
directory. That's what I meant, sorry if I wasn't clear.

In order to look at older messages you can use the :messages command.
What error exactly are you seeing?

@jmlucjav

Here is the log, thanks

16:11:01: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\]
16:11:01: Vim filetype: '', sanitized filetype: ''
16:11:01: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\]
16:11:01: Empty filename or type
16:11:01: Not a valid file, stopping processing
                                                               16:11:11: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: New file, processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIAF9B3.tmp.vim]
16:11:11: EscapeCtagsCmd called
16:11:11: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:11: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:11: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIAF9B3.tmp.vim"
16:11:11: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIAF9B3.tmp.vim"
16:11:11: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIAF9B3.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIoF9C3.tmp 2>&1"
16:11:11: Ctags error when processing file
16:11:11: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: File data outdated, updating [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIBFA8F.tmp.vim]
16:11:11: EscapeCtagsCmd called
16:11:11: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:11: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:11: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIBFA8F.tmp.vim"
16:11:11: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIBFA8F.tmp.vim"
16:11:11: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIBFA8F.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIoFAB0.tmp 2>&1"
16:11:11: Ctags error when processing file
16:11:11: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: File data outdated, updating [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:11: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VICFB5C.tmp.vim]
16:11:11: EscapeCtagsCmd called
16:11:11: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:11: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:11: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VICFB5C.tmp.vim"
16:11:11: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VICFB5C.tmp.vim"
16:11:12: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VICFB5C.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIoFB6D.tmp 2>&1"
16:11:12: Ctags error when processing file
16:11:12: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
       16:11:12: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:12: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:12: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:12: File data outdated, updating [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:12: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:12: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:12: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIDFC67.tmp.vim]
16:11:12: EscapeCtagsCmd called
16:11:12: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:12: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:12: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIDFC67.tmp.vim"
16:11:12: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIDFC67.tmp.vim"
16:11:12: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIDFC67.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIoFC78.tmp 2>&1"
16:11:12: Ctags error when processing file
16:11:12: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: ToggleWindow called
16:11:19: OpenWindow called with flags: ''
16:11:19: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\__Tagbar__]
16:11:19: Still opening window, stopping processing
16:11:19: InitWindow called with autoclose: 0
16:11:19: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\__Tagbar__]
16:11:19: In Tagbar window, stopping processing
16:11:19: Mapping keys
16:11:19: InitWindow finished
16:11:19: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:19: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: New file, processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIE199A.tmp.vim]
16:11:19: EscapeCtagsCmd called
16:11:19: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:19: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:19: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIE199A.tmp.vim"
16:11:19: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIE199A.tmp.vim"
16:11:19: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIE199A.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIo19AA.tmp 2>&1"
                          16:11:19: Command output:
16:11:19: ctags: Warning: Unsupported parameter 'n' for --vim-kinds option
cygwin warning:
  MS-DOS style path detected: C:\Users\jm\AppData\Local\Temp\VIE199A.tmp.vim
  Preferred POSIX equivalent is: /cygdrive/c/Users/jm/AppData/Local/Temp/VIE199A.tmp.vim
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
/usr/bin/sort: /tmp/tags.wArrgb: No such file or directory
ctags: cannot sort tag file : No such file or directory

                                                       16:11:19: Ctags error when processing file
16:11:19: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:19: goto_win(): 2wincmd w, 0
16:11:19: goto_win(): 2wincmd w, 0
16:11:20: goto_win(): wincmd p, 0
16:11:20: goto_win(): 2wincmd w, 1
16:11:20: goto_win(): 1wincmd w, 1
16:11:20: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:20: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:20: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:20: File data outdated, updating [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:20: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:20: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:20: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIF1E9B.tmp.vim]
16:11:21: EscapeCtagsCmd called
16:11:21: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe
16:11:21: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:21: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIF1E9B.tmp.vim"
16:11:21: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIF1E9B.tmp.vim"
16:11:21: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIF1E9B.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIo1EAC.tmp 2>&1"
16:11:21: Ctags error when processing file
16:11:21: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: OpenWindow finished
16:11:21: ToggleWindow finished
         16:11:21: AutoUpdate called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: Vim filetype: 'vim', sanitized filetype: 'vim'
16:11:21: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: File data outdated, updating [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: ProcessFile called [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: Checking if file is valid [C:\Users\jm\Dropbox\portable\vim\macmap.vim]
16:11:21: ExecuteCtagsOnFile called [C:\Users\jm\AppData\Local\Temp\VIG1F87.tmp.vim]
16:11:21: EscapeCtagsCmd called
16:11:21: ctags_bin: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe 
16:11:21: ctags_args (is a list): ['-f', '-', '--format=2', '--excmd=pattern', '--fields=nksSa', '--extra=', '--sort=yes', '--language-force=vim', '--vim-kinds=nvfacm']
16:11:21: Escaped ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIG1F87.tmp.vim"
16:11:21: Executing ctags command: c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIG1F87.tmp.vim"
16:11:21: Calling shell to execute: "c:\Users\jm\Dropbox\portable\vimtools\ctags-deploy\ctags.exe "-f" "-" "--format=2" "--excmd=pattern" "--fields=nksSa" "--extra=" "--sort=yes" "--language-force=vim" "--vim-kinds=nvfacm" "C:\Users\jm\AppData\Local\Temp\VIG1F87.tmp.vim" >C:\Users\jm\AppData\Local\Temp\VIo1F98.tmp 2>&1"
16:11:21: Ctags error when processing file
16:11:21: fileinfo empty after processing [C:\Users\jm\Dropbox\portable\vim\macmap.vim] 

One detail but I just remmebered. I previoulsy had an issue where tagbar was not working, cause windows's sort was being called. I fixed this by adding cygwin/bin first to the Path, so cygwin's sort is being called. Now I have msysgit first, so it's sort is being called (but I understand it is a older fork of cygwin, so I hope is still ok)

@majutsushi majutsushi added a commit that closed this issue Dec 25, 2013
@majutsushi Don't let ctags sort tags, closes #187
Ctags seems to call an external 'sort' which can apparently fail in some
cases with Cygwin. Since we sort the tags ourselves anyway just disable
it.
ace45ad
@majutsushi
Owner

I have no idea what strange things Cygwin is doing here again, but since Tagbar can sort by itself we don't really need Ctags to do that, too. I've therefore just disabled the sorting, which should fix your error. If it doesn't let me know.

@jmlucjav

I confirm all works perfectly again, thanks indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment