≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1716

Bug #1716: C-T 0.9 SEGV with current MacPorts Vim

Kind bug
Product Command-T
When Created 10/17/2010, updated 11/2/2010
Status closed
Reporter lRem
Tags no tags

Description

This happens with a clear install of current MacPorts Vim after installing Command-t:

$ vim
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault

GDB shows:

(gdb) r
Starting program: /opt/local/bin/vim 
Reading symbols for shared libraries .++++++++++................................................................................. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000103a79e1c in st_lookup ()
(gdb) bt
#0  0x0000000103a79e1c in st_lookup ()
#1  0x0000000103a4fca4 in rb_intern ()
#2  0x0000000103a0a1b4 in rb_define_module ()
#3  0x00000001004f3cff in Init_ext () at ext.c:45
#4  0x0000000100320804 in dln_load ()
#5  0x0000000100340c68 in rb_require_safe ()
#6  0x0000000100335c56 in rb_call0 ()
#7  0x0000000100335f9c in rb_call ()
#8  0x000000010032f524 in rb_eval ()
#9  0x00000001003407e1 in rb_load ()
#10 0x0000000100340c9f in rb_require_safe ()
#11 0x0000000100335c56 in rb_call0 ()
#12 0x0000000100335f9c in rb_call ()
#13 0x000000010032f524 in rb_eval ()
#14 0x00000001003407e1 in rb_load ()
#15 0x0000000100340c9f in rb_require_safe ()
#16 0x0000000100335c56 in rb_call0 ()
#17 0x0000000100335f9c in rb_call ()
#18 0x000000010032f524 in rb_eval ()
#19 0x00000001003323e9 in rb_eval ()
#20 0x000000010034144c in eval ()
#21 0x0000000100341f26 in rb_eval_string ()
#22 0x000000010032a8cd in rb_protect ()
#23 0x000000010014dcaa in ?? ()
#24 0x0000000100058986 in ?? ()
#25 0x0000000100059d19 in ?? ()
#26 0x000000010004a6b0 in ?? ()
#27 0x0000000100047ab4 in ?? ()
#28 0x0000000100087eea in ?? ()
#29 0x0000000100000f94 in ?? ()

Vim version is:

$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 17 2010 12:40:07)
MacOS X (unix) version
Included patches: 1-21
Compiled by lrem@remigiusz-modrzejewskis-macbook-pro.local
Normal 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 
-conceal +cryptv -cscope +cursorbind +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 -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
 -xterm_clipboard -xterm_save 
   system vimrc file: "/opt/local/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/gcc-4.2 -c -I. -Iproto -DHAVE_CONFIG_H   -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp  -O2 -arch x86_64 -D_FORTIFY_SOURCE=1     -I/opt/local/lib/ruby/1.8/i686-darwin10 -DRUBY_VERSION=18 
Linking: /usr/bin/gcc-4.2   -L. -L/opt/local/lib  -L/opt/local/lib -arch x86_64 -L/usr/local/lib -o vim       -lm  -lncurses -liconv -framework Cocoa        -lruby -lobjc

Ruby version is:

$ ruby --version
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Comments

  1. lRem 10/17/2010

    At the same time it works flawless in MacVim.

  2. Greg Hurrell 10/17/2010

    This will happen whenever you build Command-T and link it against one version of Ruby, and then run a Vim which links against a different version of Ruby.

    You haven't provided the Command-T build transcript, but I imagine what is happening is that it is linking against the system Ruby, which is what MacVim links against and which is why it works fine with MacVim. On the other hand, when you try to run it against a MacPorts version of Vim you're crashing because that Vim links against its own, different version of Ruby.

    So if you want it to work in both MacPorts Vim and MacVim you'll need to build everything (Command-T, Vim, and MacVim) linking against the MacPorts version of Ruby.

    A simpler solution, however, would be just to use MacVim (note that it comes with a command-line version for use in the terminal — /Applications/MacVim.app/Contents/MacOS/vim — which you can use by setting your PATH appropriately, or making an alias, or setting your EDITOR environment variable accordingly etc) and build Command-T using the system Ruby. If you want a custom build of Vim that's easily doable too, as MacVim is quite straightforward to build from source.

  3. Greg Hurrell 11/2/2010

    In the absence of a reply I assume you've got this one sorted out, so I'm going to mark the ticket as closed. Feel free to comment again if you want me to re-open it.

  4. Greg Hurrell 11/2/2010

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets