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

OS X: segfaulting with homebrew MacVim (vim version 7.4.383) #5

Closed
oblitum opened this issue Dec 30, 2014 · 21 comments
Closed

OS X: segfaulting with homebrew MacVim (vim version 7.4.383) #5

oblitum opened this issue Dec 30, 2014 · 21 comments
Assignees
Labels
Milestone

Comments

@oblitum
Copy link

oblitum commented Dec 30, 2014

My system's clang is the HEAD one and color_coded is segfaulting with it. I'll try to debug it when I have time but I guess it should be taken it account since it may get same behavior on clang 3.6.

The reason the system libclang is being loaded and not the one embedded by the plugin is because of rpath settings.

You may take a look at these issues and YCM code to learn how it may be fixed:

ycm-core/ycmd#65
ycm-core/ycmd#66

I have run install_name_tool -change @rpath/libclang.dylib ../clang+llvm-3.5.0-macosx-apple-darwin/lib/libclang.dylib bin/color_coded.so to force it to load the embedded lib.

@oblitum
Copy link
Author

oblitum commented Dec 30, 2014

ah, it seems to be segfaulting with the shipped one too...

@jeaye jeaye self-assigned this Dec 31, 2014
@jeaye jeaye added the bug label Dec 31, 2014
@jeaye jeaye added this to the 0.1 milestone Dec 31, 2014
@jeaye
Copy link
Owner

jeaye commented Dec 31, 2014

I haven't tested on OS X in a while. I'll take a look at this today, thank you.

@jeaye
Copy link
Owner

jeaye commented Jan 10, 2015

I have been unable to reproduce any such issues on OS X. Are you certain it's not your environment?

@oblitum
Copy link
Author

oblitum commented Jan 10, 2015

Will try it again and will report back soon.

@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

Happening consistently for me after "CursorHold" is triggered.

This is the lldb's backtrace I get from the coredump:

* thread #1: tid = 0x0000, 0x00007fff84d7f292 libsystem_kernel.dylib`__kill + 10, stop reason = signal SIGSTOP
  * frame #0: 0x00007fff84d7f292 libsystem_kernel.dylib`__kill + 10
    frame #1: 0x0000000107e614fe Vim`mch_exit + 184
    frame #2: 0x00007fff85dfe5aa libsystem_platform.dylib`_sigtramp + 26
    frame #3: 0x0000000107dab221 Vim`set_ref_in_item + 11
    frame #4: 0x0000000107dab24c Vim`set_ref_in_item + 54
    frame #5: 0x0000000107efbff9 Vim`luaV_setref + 228
    frame #6: 0x000000010813aec8 liblua.5.2.dylib`luaD_precall + 426
    frame #7: 0x000000010813b1b7 liblua.5.2.dylib`luaD_call + 59
    frame #8: 0x0000000108137bbc liblua.5.2.dylib`lua_callk + 73
    frame #9: 0x0000000107dab07a Vim`garbage_collect + 457
    frame #10: 0x0000000107e6015f Vim`mch_inchar + 117
    frame #11: 0x0000000107ed78e3 Vim`ui_inchar + 277
    frame #12: 0x0000000107dfedc3 Vim`inchar + 450
    frame #13: 0x0000000107e01bb9 Vim`vgetorpeek + 4231
    frame #14: 0x0000000107e0067d Vim`vgetc + 193
    frame #15: 0x0000000107e01fcb Vim`safe_vgetc + 9
    frame #16: 0x0000000107e3c3ae Vim`normal_cmd + 318
    frame #17: 0x0000000107f1818f Vim`main_loop + 1280
    frame #18: 0x0000000107f17614 Vim`main + 12092
    frame #19: 0x00007fff8ed125fd libdyld.dylib`start + 1
    frame #20: 0x00007fff8ed125fd libdyld.dylib`start + 1

I may have to build a debugging version of Vim do debug this. Will see if there's any change with an updated version.

@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

meh, I was already with latest macvim from november...

@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

So, I've cloned the tip of vim from original repositories and tested both a debug and release compilation and there's no such behavior indeed.

So it must be a bug in macvim, or in the specific vim version macvim is currently based upon.

@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

By the way on OS X I've found this problem with the latest vim sources...

https://groups.google.com/d/msg/vim_dev/WVE9W-j3sK8/2eFXS_r7xR4J

@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

In the official repository I've checkout the tag that corresponds to the version that's currently bundled with MacVim and there's still no issue. So, it must be a bug in MacVim, or maybe, related to how homebrew builds it.

Notice this is happening with MacVim (vim version 7.4.383) that's available through homebrew, for current version as well as --HEAD installation. This is also a problem because OS X users generally like to take vim/macvim through homebrew instead of cloning and building vim themselves.

@oblitum oblitum changed the title OS X: segfaulting with clang's HEAD. OS X: segfaulting homebrew MacVim (vim version 7.4.383) Jan 13, 2015
@oblitum oblitum changed the title OS X: segfaulting homebrew MacVim (vim version 7.4.383) OS X: segfaulting with homebrew MacVim (vim version 7.4.383) Jan 13, 2015
@oblitum
Copy link
Author

oblitum commented Jan 13, 2015

I won't be digging this further sorry, I'll stick with official vim for the console.

@jeaye
Copy link
Owner

jeaye commented Jan 14, 2015

No need to apologize, mate. You've done some excellent troubleshooting here and have given me more than enough information to pick up where you left off. Thank you.

@jeaye
Copy link
Owner

jeaye commented Apr 1, 2015

I believe this has been fixed, as part of #10 which was a nasty bug where the system libclang files could be mixed with color_coded. I have tested color_coded on a fresh Yosemite install with non-HEAD macvim from brew and everything is working nicely.

If you get the time to verify, please do. Otherwise, I'll close this in a couple of days.

@jeaye
Copy link
Owner

jeaye commented Apr 1, 2015

I should clarify, the changes are currently on the clang branch, not yet in master.

EDIT: scratch that, this is in master; it's a blocking bug fix and is working for me on Linux and OS X. You should use master.

@oblitum
Copy link
Author

oblitum commented Apr 1, 2015

I'll check it asap.

@jeaye
Copy link
Owner

jeaye commented Apr 2, 2015

Any update?

@oblitum
Copy link
Author

oblitum commented Apr 2, 2015

Just tried with a new MacVim installation, seems to be gone.

@oblitum oblitum closed this as completed Apr 2, 2015
@oblitum
Copy link
Author

oblitum commented Apr 2, 2015

Thanks.

@jeaye
Copy link
Owner

jeaye commented Apr 2, 2015 via email

@oblitum
Copy link
Author

oblitum commented Apr 2, 2015

Thanks.

\o/ Thank you for all the help.

np!
OT: you're getting lots of stars all of a sudden, did you publish it on HN or something?

@oblitum
Copy link
Author

oblitum commented Apr 2, 2015

Ah, I did find the link on HN :-)

@jeaye
Copy link
Owner

jeaye commented Apr 2, 2015

:D

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

No branches or pull requests

2 participants