odeke-em / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

"Vim: Caught deadly signal SEGV" #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have reduced my vimrc to a minimal example:

set lines=27 columns=83
set laststatus=2

When I run gvim somefile.txt from an oversized terminal window (say, 97x42), 
then it crashes with the error:

Vim: Caught deadly signal SEGV

Sometimes it crashes instantly, while other times, it takes a while. When the 
crash is not instant, I notice that the status bar isn't rendered.

This crash occurs in both lxterminal and gnome-terminal.

gvim --version gives:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 30 2014 13:30:03)
Included patches: 1-316
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by spectral@google.com
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/x86_64-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/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng12   -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/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-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/freetype2 -I/usr/include/atk-1.0 
-I/usr/lib/x86_64-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 -Wformat-security 
-Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     
-I/usr/include/tcl8.5  -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 -lfreetype 
-lfontconfig -lgobject-2.0 -lglib-2.0     -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 -lfreetype 
-lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -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.1 -Wl,-E  
-fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm 
-lpthread -lcrypt -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil 
-lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib 
-ltcl8.5 -ldl -lpthread -lieee -lm -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm  
-L/usr/lib

Original issue reported on code.google.com by amcn...@google.com on 11 Jun 2014 at 4:51

GoogleCodeExporter commented 9 years ago
I cannot reproduce it.  Would you be able to run Vim inside gdb or under 
valgrind, to find out where the crash happens?

Original comment by brammool...@gmail.com on 11 Jun 2014 at 6:20

GoogleCodeExporter commented 9 years ago
Here is the output from valgrind. The binary is stripped, so I hope it's not 
too useless.

Original comment by amcn...@google.com on 11 Jun 2014 at 6:36

Attachments:

GoogleCodeExporter commented 9 years ago
I can sometimes reproduce it. This patch fixes the crash for me:
diff --git a/src/window.c b/src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -4721,6 +4721,8 @@ win_alloc_lines(wp)
 win_free_lsize(wp)
     win_T      *wp;
 {
+    if (wp == NULL)
+       return;
     vim_free(wp->w_lines);
     wp->w_lines = NULL;
 }

There is however some other strange going on. Half of the times I run
./vim -N -g -f --noplugin -u /tmp/vimrc file.c
the window opens fine, but Vim seems to get confused about the screensize. The 
last line is not drawn correctly. If I do :set number, it jumps from 26 in the 
second last line to 32 in the last line.

Original comment by chrisbr...@googlemail.com on 11 Jun 2014 at 7:47

GoogleCodeExporter commented 9 years ago
The errors in the libfontconfig.so look like a library problem: reading 4 bytes 
where there are only 2.  Because of alignment this probably does not cause a 
crash.

The error below update_screen() is most likely what causes the crash.  Can't 
see what happens there from this info though.

Original comment by brammool...@gmail.com on 12 Jun 2014 at 9:43

GoogleCodeExporter commented 9 years ago
fixed by 7.4.235

Original comment by chrisbr...@googlemail.com on 2 Oct 2014 at 7:48