nsf / gocode

An autocompletion daemon for the Go programming language
MIT License
5.01k stars 658 forks source link

panic: unknown export format version -1 #518

Closed fhmily closed 6 years ago

fhmily commented 6 years ago

go version: go version devel +30b6bc30b2 Thu May 24 22:08:00 2018 +0000 darwin/amd64

Using GoCode with VIM & YCM. Panic even with fmt. with the following logs.

panic: unknown export format version -1 ("i\x00\xe9\x03\xc6\x06\x18$GOROOT/src/fmt/print.go\x00\x05Write\x01b\x01n\x03err\x05Width\x03wid\x02ok\tPrecision\x04prec\x04Flag\x01c\x06Format\x01f\x05State\x06String\bGoString\x01w\x06Writer\x02io\x06format\x01a\aesc:0x1\aesc:0x9\x17$GOROOT/src/fmt/scan.go\bReadRune\x01r\x04size") 1(runtime.call32): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/asm_amd64.s:554 2(runtime.gopanic): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/panic.go:494 3(main.(gc_bin_parser).parse_export): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/package_bin.go:126 4(main.(package_file_cache).process_package_data): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/package.go:129 5(main.(*package_file_cache).update_cache): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/package.go:90 6(main.update_packages.func1): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/autocompletecontext.go:412 7(runtime.goexit): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/asm_amd64.s:1365

panic: One of the package cache updaters panicked 1(runtime.call32): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/asm_amd64.s:554 2(runtime.gopanic): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/panic.go:494 3(main.update_packages): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/autocompletecontext.go:420 4(main.(auto_complete_context).update_caches): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/autocompletecontext.go:165 5(main.(auto_complete_context).apropos): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/autocompletecontext.go:334 6(main.server_auto_complete): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/server.go:202 7(main.(RPC).RPC_auto_complete): /Users/jackwang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/gocode/rpc.go:26 8(runtime.call64): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/asm_amd64.s:555 9(reflect.Value.call): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/reflect/value.go:447 10(reflect.Value.Call): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/reflect/value.go:308 11(net/rpc.(service).call): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/net/rpc/server.go:384 12(runtime.goexit): /usr/local/Cellar/go/HEAD-30b6bc3/libexec/src/runtime/asm_amd64.s:1365

I've already tried upgrading both system $gopath gocode and the one under YCM third_party directory.

gocode repo version under both path: commit 9d1e0378d35b0527c9aef0d17c0913fc38d88b81 (HEAD, origin/master, origin/HEAD, master)

fhmily commented 6 years ago

It seems everything goes well after I switch to repo: https://github.com/mdempsky/gocode