Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim can be crashed when vim-rails and matchit are installed #128

Closed
graudeejs opened this issue Nov 7, 2011 · 6 comments
Closed

vim can be crashed when vim-rails and matchit are installed #128

graudeejs opened this issue Nov 7, 2011 · 6 comments

Comments

@graudeejs
Copy link
Contributor

Recently I experienced quite few vim crashes (unbelievable, but fact).
Today I found out where these come from.

vim-rails + matchit is deadly combination.

When both are installed, open some view that contains lines such as:

$("#add_permission_form").html("#{escape_javascript( render :partial => "form_add_permission", :layout => false  )}");

now when cursor is on render.... part, and you git "gf" to go to form_add_permission partial (which doesn't exist [In my case it exists, but I use haml, and vim-rails doesn't find it]).
At the bottom of screen you get:

E345 Cannon find file "_form_add_permission" in path

now in few seconds (about 10-30) vim will crash (you can open other view/controller meanwhile, but crash is inevitable)

Vim: Finished.
Bus error

and virtual terminal (xterm) is corrupted (at least this time): when I try to select something with mouse or simply click with any mouse button, it types various characters.

This is probably matchit bug, but since it's triggered by vim-rails feature I report it here. Besides I've no idea if anyone is maintaining matchit.

I tried matchit that comes with vim and the one from https://github.com/mhz/vim-matchit, both crash

Misc info
OS: FreeBSD 8.2-STABLE
vim-rails: latest from git

$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 29 2011 09:54:24)
Included patches: 1-121
Compiled by graudeejs@work.pc
Big version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +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 -lua +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 +persistent_undo +postscript +printer -profile 
+python -python3 +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_interact +xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/drm -I/usr/local/include  -O2 -pipe -fno-strict-aliasing  -D_FORTIFY_SOURCE=1     
Linking: cc -L/usr/local/lib -lXt -L.  -rpath=/usr/lib:/usr/local/lib -pthread -rdynamic  -L/usr/local/lib -Wl,--as-needed -o vim     -pthread -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lgio-2.0 -lXfixes -lcairo -lX11 -lpango-1.0 -lm -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0  -lSM -lICE -lXpm  -lXt  -lXdmcp -lSM -lICE  -lm -lelf  -pthread -ltermlib -liconv -lintl          -L/usr/local/lib/python2.7/config -lpython2.7 -lutil -lm -Wl,--export-dynamic      -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby19 -lcrypt -lm -L/usr/local/lib  -rpath=/usr/lib:/usr/local/lib -pthread

My entire vim config: https://github.com/graudeejs/dot.vim

NOTE: crash happens in both vim and gvim

@tpope
Copy link
Owner

tpope commented Dec 11, 2011

If Vim itself is crashing, it's hard to label this as anything other than a Vim bug. Aggravated by rails.vim and matchit, perhaps, but a Vim bug nonetheless. I'm not sure how to proceed, as I've been using both plugins together happily for years.

@graudeejs
Copy link
Contributor Author

So can you reproduce this behavior or not?

@tpope
Copy link
Owner

tpope commented Dec 11, 2011

No.

@tpope
Copy link
Owner

tpope commented Dec 11, 2011

Also I forgot to mention that it should find Haml files. Works for me. But even if the file really doesn't exist, I can't extract a crash from it.

@graudeejs
Copy link
Contributor Author

Can you verify that you can't reproduce this problem with my config:
https://github.com/graudeejs/dot.vim (git clone ~/.vim && make)

@graudeejs
Copy link
Contributor Author

The problem seams long gone
:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants