I get this problem when I start Vim with -p option. Suppose, I started out with

vim -p first.txt second.txt

Then after editing first.txt I move to second.txt using gt. I press the keys gg and G again. This produces the error

Vim: Caught deadly signal SEGV

From this point, Vim doesn't respond to any signal including Ctrl D. I can close this session only by killing the terminal.

This problem arises only when I invoke Vim with -p option. If I open first.txt first and then use :tabe to open second.txt, this problem doesn't arise.

Any ideas why this might occur?

Output of vim --version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:40:46)
Included patches: 1-52
Modified by [email protected]
Compiled by buildd@
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     +tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz   -pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/i386-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/i386-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.6  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lfreetype -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-i386-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/i386-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   

Output of uname -a:

Linux nitish 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:37:48 UTC 2015 i686 i686 i686 GNU/Linux

Based on comments by @Carpetsmoker, I found out that the problem is because of my .vimrc file. So I checked ran the problem causing command with some portions of the .vimrc file commented. Finally I found out that the problem is with the line

set columns=1000

How can so innocent command cause this problem? :help columns didn't give any useful information regarding this.

  • 2
    which vim (and patch level) are you using? (like vim --version output), and what OS? Regardless, it would be a good idea to update vim. If you're on a Mac and you use ruby plugins (like command-T), you might reinstall them and/or make sure vim is using system ruby and not rvm ruby (which seems to have caused troubles for some people) Commented Feb 18, 2015 at 5:20
  • 1
    You can start vim as vim -u NONE -p first.txt second.txt ... This will prevent loading your vimrc file. Commented Feb 18, 2015 at 10:47
  • @hatter The vim was installed or compiled? Can you upgrade it to 7.4 and see if that helps.
    – kenorb
    Commented Feb 18, 2015 at 13:04
  • @kenorb Vim was installed.
    – nitishch
    Commented Feb 18, 2015 at 14:49
  • @Carpetsmoker It worked!! Does this definitively point that there is a problem in .vimrc file?
    – nitishch
    Commented Feb 18, 2015 at 14:50

3 Answers 3


The SEGV signal, also known as a segfault, is almost always due to a bug in the program you're running—in this case, vim. (Other causes are things like defective hardware, or once in a blue moon, kernel bugs).

So, really, you need to report a bug. :help bug-reports provides instructions on how to report a bug. It sounds like you've already got a minimal set of steps to reproduce the problem, so that's most of the work there. You should probably test a newer version of Vim first though, just to make sure it hasn't already been fixed.

  • I am using Vim 7.4. Official website says this is the latest version.
    – nitishch
    Commented Feb 19, 2015 at 5:28
  • @hatter you have fewer patches applied than are available.
    – derobert
    Commented Feb 19, 2015 at 5:45
  • He's running Debian, so that explains that :-) Commented Feb 19, 2015 at 10:57
  • @Carpetsmoker I'm running Debian and have through patch 488... I'm not sure why OP has older. Wheezy (current release) has 7.3, so OP isn't using that. Unstable, Jessie, and Wheezy-Backports all have 7.4 patch 488. (Given, 640 is current, so that's still somewhat old.)
    – derobert
    Commented Feb 19, 2015 at 16:50

If your vim crashes because of segmentation fault, that indicates memory access violation which is caused either by software bug or hardware issues.

If this happens repeatedly, you should do in order:

  1. Disable plugins by running: vim -u NONE and see if that helps.
  2. Upgrade your vim to the latest stable version.
  3. Upgrade your vim to the latest development version.
  4. Optionally double check the same vim version on different machine (maybe it's caused by hardware issues).
  5. Try to run vim under debugger, e.g.: gdb vim and check for the backtrace (after SEGV, in gdb: type bt or bt full).
  6. If the backtrace doesn't have symbols, you've to recompile your vim to include these.
  7. If you've complete backtrace, please check for similar issues or report a new bug in vim's bug tracker (for plain vim) or check for :help bugs. If you've different version of vim (like gVim, MacVim, NeoVim), please report it to the right maintainers.
  • 2
    This happens only on my system. Doesn't happen with -u NONE. Seems the line set columns=1000 in .vimrc is the culprit.
    – nitishch
    Commented Feb 19, 2015 at 13:22

Segmentation faults may also be connected to interacting servers like netbeans and an autocmd that invalidates a buffer (e.g. BufNewFile operations) that another program (plugin, ...) expects (or similar) in the .vim configuration, try commenting those lines in e.g. the .vimrc.

Typical error message is:

missing ! or / in <number>:<command>

where command can be e.g. editFile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.