13 Replies Latest reply: Oct 3, 2012 9:47 AM by jeffrey.knight
jswetzen Level 1 (0 points)

Hi all,


Vim keeps crashing on me every so often after installing Lion. It says "Vim: Caught deadly signal SEGV" and then it just stops responding and I have to close vim from the activity monitor; even closing the terminal doesn't stop the vim process from using about 45% of one of my cores! Vim is now very unstable and practically unusable in Lion, but it's one of the programs I use the most.


Is there any solution to this, or do I have to compile vim on my own to see it that will help?




MacBook Pro, Mac OS X (10.7)
  • dlarimer Level 1 (0 points)

    I am having the same problem.  Even using the latest vim from macports, 7.3.723.

  • vvalee Level 1 (0 points)

    Mine as well. Vim is the one coming with OS X.

  • firebalrog Level 1 (0 points)

    mine as well especially if I have multiple buffers open

  • escheriv Level 1 (0 points)

    Same here. Just started happening in the past two days, and I'm a heavy vim user.


    If I'm lucky, it manages to save before totally dying, but that's at about 50/50 right now.

  • MrClow Level 1 (0 points)

    I seem to have fixed the issue when I opened ~/.viminfo and commented out everything.


    Sledge hammer approach, I know, but it's progress, no? Got the idea from here:



    If I run into undesirable side effects, I post more here. If anyone can site why this is a bad idea, I'd love to hear it before it burns me

  • MrClow Level 1 (0 points)

    Nevermind, now I've got this:


    vi(21203) malloc: *** error for object 0x7fe112504408: incorrect checksum for freed object - object was probably modified after being freed.


    Here's hoping that might help someone more knowledgeable solve the problem...

  • dlarimer Level 1 (0 points)

    Every time it crashes for me I get the following backtrace:


    0   libsystem_kernel.dylib                  0x00007fff9325382a __kill + 10

    1   vi                                      0x000000010ac9ab71 0x10ab73000 + 1211249

    2   libsystem_c.dylib                       0x00007fff8cc46cfa _sigtramp + 26

    3   libsystem_c.dylib                       0x00007fff8cc46484 strncmp + 148

    4   libcopyfile.dylib                       0x00007fff930b8204 copyfile + 514

    5   vi                                      0x000000010abd4887 0x10ab73000 + 399495

    6   vi                                      0x000000010abac485 0x10ab73000 + 234629

    7   vi                                      0x000000010abc17ab 0x10ab73000 + 321451

    8   vi                                      0x000000010ac1e7cf 0x10ab73000 + 702415

    9   vi                                      0x000000010ac27e09 0x10ab73000 + 740873

    10  vi                                      0x000000010abec29e 0x10ab73000 + 496286

    11  vi                                      0x000000010abee9d2 0x10ab73000 + 506322

    12  vi                                      0x000000010ab73d04 0x10ab73000 + 3332


    I recently had to switch back to Lion after downgrading and was disapointed to see this problem still occuring on a new laptop shipped with Lion.   Has anyone looked through the vim source code for calls to copyfile()?  Did Apple change something with this API in Lion?

  • dlarimer Level 1 (0 points)

    Since I downloaded vim 7.3 and compiled with -g I have not had any vim crashes in over 24 hours of continous use.

  • dlarimer Level 1 (0 points)

    No crashes in the past 4 days, when I normally crashed a couple of times per hour while writing code.  At this point, I am convinced that building vim from source (not mac ports) with debug enabled is a working solution.

  • Chadoh Level 1 (0 points)

    @dlarimer – Thanks for the tip. I've installed from source, but I'm not sure where I was supposed to use the `-g` flag.


    For any future visitors to this little post who are as new at compiling from source as me, here are all the steps:


    Download vim and unzip it. Then cd into the directory with it and


    ./configure --with-features=big


    sudo make install

    sudo make install clean


    This will install the vim executables in /usr/loca/bin. If you want them to be in /usr/bin (where they used to be), you'll have to move them.


    The `--with-features=big` flag is needed for some plugins that use unicode/multi-byte characters.


    I just did this, so I don't know how well it's working yet, but you give me hope, @dlarimer. :-)

  • Chadoh Level 1 (0 points)

    It's been working flawlessly for hours, now. That's a first, on this machine since the Lion upgrade.

  • alvinyc Level 1 (0 points)

    I found that vim will crash if you're editing files with extended attribute.

    You may found @ symbol if you do a ls -l

    Once I remove the extended attributes, my vim doesn't crash already. It seems like the vim shipped with lion doesn't support extended attributes.

    Hope this help.

  • jeffrey.knight Level 1 (0 points)

    +1, problem confirmed here, both with 7.3 and vim installed from brew via https://raw.github.com/AndrewVos/homebrew-alt/master/duplicates/vim.rb


    I rebuilt from source (http://www.vim.org/mercurial.php) and so far so good ...