Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Vim segmentation fault when open #56

Closed
nyibbang opened this issue Jun 9, 2015 · 7 comments
Closed

Vim segmentation fault when open #56

nyibbang opened this issue Jun 9, 2015 · 7 comments

Comments

@nyibbang
Copy link

nyibbang commented Jun 9, 2015

Hi ! First of all I must say I was very happy to find out today about your plugin, and I thank you for your work. But sadly I have been struggling with an issue when trying to use it.

I installed the plugin using Vundle, went into my ~/.vim/bundle/color_coded and accordingly to the README did :

mkdir build; cd build; cmake ..; make && make install

All went fine, it downloaded clang, compiled the code and installed it as ~/.vim/bundle/color_coded/bin/color_coded.so. I can even cd in the directory containing that library, do lua -l color_coded and get the LUA prompt.
Despite everything going well, when I tried to launch vim, I got the error color_coded unavailable: you need to compile it (see README.md) for some reason. I then tried to use :PluginUpdate to see if it would change anything, but since then when I try to launch vim, I get a segfault :

Vim: Caught deadly signal SEGV
Vim: Finished.
[1]    22076 segmentation fault  vim

I tried to wipe out my build and bin directory in color_coded and compile it again, it compiled fine but vim still segfaults. When I comment the line Plugin 'jeaye/color_coded' in my vimrc, vim opens fine.

I'm running Debian 8, with g++ 4.9.2, lua 5.1.5, vim 7.4.576 compiled with lua support.
I had this issue on commit d21d70f.

EDIT:
I just saw this in the README https://github.com/jeaye/color_coded#color_coded-crashes-on-startup but vim --version | grep jit prints nothing for me, so it doesn't seem to be linked.

@jeaye
Copy link
Owner

jeaye commented Jun 10, 2015

Will you please paste the full output of vim --version?

@nyibbang
Copy link
Author

Sure, here you go

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:36:07)
Included patches: 1-488, 576
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by jamessan@debian.org
Huge version with GTK2 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/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2    -g -O2 -fPIE -fstack-protector-strong -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,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype  -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/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm 

@jeaye
Copy link
Owner

jeaye commented Jun 10, 2015

Thanks. This is a unique case, I think. Are there any peculiarities with your setup? This issue might be caused by lua or vim being compiled with a different version of GCC than color_coded, for example. Is any of the software involved self-compiled, or all standard from Debian?

@nyibbang
Copy link
Author

I installed vim from the vim-gtk package, and lua from the list of dependencies you give in the readme : sudo apt-get install build-essential liblua5.1-dev lua5.1 libncurses-dev libboost-dev libz-dev cmake xz-utils.
It's a fairly new install of debian (from 3 weeks ago), so I haven't had time to pollute it yet. Everything is from standard debian repositories.

@UnrealQuester
Copy link
Collaborator

It looks like your vim is linked with lua 5.2 but color_coded is linked against 5.1. You will have to uninstall liblua5.1-dev so it does not get selected in the build process of color_coded (See #53) and install liblua5.2-dev lua5.2. Then you have to build color_coded again. I am not sure if make clean is enough. You should also remove your build directory and do a completly new build of color_coded.

@nyibbang
Copy link
Author

Indeed, color_coded found lua5.1 and linked with it:

ldd colod_coded.so
[...]
    liblua5.1.so.0 => /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 (0x00007f9c43ac1000)
[...]

And vim was using lua 5.2:

ldd /usr/bin/vim
[...]
    liblua5.2.so.0 => /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 (0x00007f4088763000)
[...]

I uninstalled liblua.5.1-dev (sudo apt-get remove liblua.5.1-0-dev), installed liblua.5.2-dev instead (sudo apt-get install liblua.5.2-dev), removed my bin and build directories in color_coded, rebuilt from scratch and it works fine.
Thank you !

@jeaye
Copy link
Owner

jeaye commented Jun 16, 2015

@nyibbang This may have been fixed, such that you don't need to mess with your packages, after #53 was merged. If you can check again, let me know.

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

No branches or pull requests

3 participants