basilgor / vim-autotags

vim plugin for easy ctags and cscope handling in a separate directory
21 stars 4 forks source link

Weird problem opening a file #4

Closed woshilapin closed 11 years ago

woshilapin commented 11 years ago

When open a new file in a specific condition (not yet identified but some details below), I get the following error:

Error detected while processing function <SNR>19_AutotagsInit..<SNR>19_AutotagsSearchLoadTags:
line    2:
E16: Invalid range
line    9:
E16: Invalid range

I tried to identify the problem and the error is done by the findfile() function. However, in most of my directories, I have not this problem.

Firstly, I suspect that the current absolute path has a weird character (like a space or an accentuated character): my current directory only has a few spaces in it. Moreover, I succeed in opening a file in a weirder directory (spaces and accentuated characters).

Secondly, I suspected a weird filetype where other vim plugin are loaded and interfere with vim-autotags. But I tested a few different extension in this broken directory with always the same result. However, in sane directories, no problem with the same directories.

Thirdly, I suspected a previous generation of tags or cscope.out file (even if I don't need them in this broken directory) then I cleaned my .autotags/byhash/ directory. Unsuccessful.

My vim version is here.

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 12 2010 12:49:33)
Included patches: 1-445
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope
+cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec
+mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript +printer
+profile -python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu
+windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -Wall -g -O2
Linking: gcc   -Wl,--as-needed -o vim       -lm -lncurses -lselinux -lacl -lgpm

I have no tags or cscope.out (or other cscope files) in the directory, in all the parent directories or subdirectories (indeed, there is not subdirectories).

The last detail that may be the cause of the problem is that the directory is in a Dropbox directory. However, all the test I previously explained have been made on Dropbox too: I have sane directories AND broken directories in Dropbox.

woshilapin commented 11 years ago

Some other problems seems to make me think that this is a Vim problem and not a vim-autotags plugin problem. In fact, if I source (the vim macro) a file in this same broken directory, I have the same error on the line where the source macro is called. So I tried to move the all directory in a more simple directory name (without space) and it seems to work. This problem is a mistery, why vim has problem on some weird path and has no problem on simpler or weirder path? However, I close this ticket because it seems to be independent of the vim-autotags project.