Closed tetsutan closed 11 years ago
Could you try without neocomplcache? (In fact with only clang_complete plugin) Thanks!
Without neocomplcache, It shows no error.
On filetype=c file, regardless of using neocomplcache, it have no error and display completions.
On filetype=objc file and import headers of Xcode(e.g. .clang_complete includes "-I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include"), Regardless of using neocomplcache (,and regardless of using libclang), It display NO completions.
Crash when ・filetype=objc ・import headers of Xcode ・g:clang_use_library = 1 ・use neocomplcache
No Completion when ・filetype=objc ・import headers of Xcode ・(g:clang_use_library = 1 / 0) ・(with/without neocomplcache)
When you say "It display NO completions", did you try using
I create Xcode project named "first".
yano@masck.local [~/dev/xcode/first/first] [master *]
-> % ls [05:26:58] .rb system .py 2.7.3 .js v0.8.16
AppDelegate.h DetailViewController.h MasterViewController.h en.lproj first-Prefix.pch
AppDelegate.m DetailViewController.m MasterViewController.m first-Info.plist main.m
yano@masck.local [~/dev/xcode/first/first] [master *]
-> % cat .clang_complete [05:26:59] .rb system .py 2.7.3 .js v0.8.16
-I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include
yano@masck.local [~]
-> % cat .vimrc [05:34:33] .rb system .py 2.7.3 .js v0.8.16
" vundle
set nocompatible
filetype off
set rtp+=~/.vim/neobundle.vim.git
if has('vim_starting')
set runtimepath+=~/.vim/neobundle.vim.git
call neobundle#rc(expand('~/.vim/bundle/'))
endif
NeoBundle 'Shougo/neocomplcache'
NeoBundle 'Rip-Rip/clang_complete'
filetype on
filetype indent on
filetype plugin on
" neocomplcache
let g:neocomplcache_enable_at_startup = 1
" ignore case
let g:neocomplcache_enable_ignore_case = 1
" 大文字小文字を区別する
let g:neocomplcache_enable_smart_case = 1
" キャメルケース補完を有効にする
"let g:neocomplcache_enable_camel_case_completion = 1
" アンダーバー補完を有効にする
let g:neocomplcache_enable_underbar_completion = 1
" force omni
if !exists('g:neocomplcache_force_omni_patterns')
let g:neocomplcache_force_omni_patterns = {}
endif
let g:neocomplcache_force_overwrite_completefunc = 1
let g:neocomplcache_force_omni_patterns.c =
\ '[^.[:digit:] *\t]\%(\.\|->\)'
let g:neocomplcache_force_omni_patterns.cpp =
\ '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
let g:neocomplcache_force_omni_patterns.objc =
\ '[^.[:digit:] *\t]\%(\.\|->\)'
let g:neocomplcache_force_omni_patterns.objcpp =
\ '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
" clang
let g:clang_complete_auto = 0
let g:clang_auto_select = 0
let g:clang_use_library = 1
" let g:clang_library_path = "/usr/lib"
" let g:clang_complete_copen = 0
" let g:clang_user_options='|| exit 0'
" let g:clang_close_preview=1
" let g:clang_user_options = ' -fblocks -fobjc-arc -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include -std=c++11 -include=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h '
let g:clang_user_options = '-std=c++11'
vim crash when open MasterViewController.m and execute ^X^U.
vim does not crash when I create new file (test.cpp) on same directory and execute ^X^U. neocomplcache_enable_at_startup is true, therefore completion is showed automatically on test.cpp. but ^X^U is hooked.
Thanks for those infos. If you have some time could you try bisecting it? That would help us finding a fix quickly!
Before doing that, could you test the code in pull request #239, it may solve the issue.
Sorry. NO completion is my mistake. g:neocomplcache_force_omni_patterns.objc was wrong.
but segv still occur, when I press ^X^U.
line at 328 on libclang.py, vim.eval('compelte_check()') got segv
this bug may owe vim. The cause is compl_shown_match is NULL on edit.c of vim. libclang.py call vim.eval('complete_check()'). complete_check call ins_compl_check_keys. ins_compl_check_keys call ins_compl_next. ins_compl_next refer to compl_shown_match.
Meanwhile, it is not checked whether compl_shown_match is NULL. I do not know that compl_shown_match must be set. I cannot determine that this is Vim issue or clang_complete issue or neocomplcache issue. Neocomplcache may reset compl_shown_match. If resetting compl_shown_match by neocomplcache is wrong way, I will report to an auther of neocomplcache.
Since you have access to the backtrace, it would be great if you could fully trace it into clang_complete and neocompletecache. I'm in fact worried about a comment in complete_check documentation that say: "Only to be used by the function specified with the 'completefunc' option."
Thanks a lot.
this does not seem to come into conflict with neocomplcache.
Great! Closing this bug.
When I set g:clang_use_library = 0, Vim was not crashed. But, changed to g:clang_use_library = 1, crashed. In either case, I used neocomplcache.
this is GDB log.
and then , _compl_showsdir pointer was 0x00. backtrace is here. https://gist.github.com/4513231
this is My MINIMUM vimrc
Vim: (and compiled from source code to use with gdb)
clang:
OS: MacOS 10.8.2 Mountain Lion. neocomplcache: d62b955 2013-01-07 clang_complete: ef3ddfd 2012-11-20