Comments (10)
What's the Go version? What's the gocode version?
Can't reproduce on my machine, works just fine:
from gocode.
hg tip
. I tested it with latest on windows.
from gocode.
Also, try this: run gocode daemon by hand in a separate console window. For windows:
start -> run... cmd
gocode close
gocode -s
and then try again. Since it is a daemon panic, it will show you the stack trace, put it here.
from gocode.
panic: runtime error: index out of range
1(runtime.panic): /go/src/pkg/runtime/proc.c:1275
2(runtime.panicstring): /go/src/pkg/runtime/runtime.c:128
3(runtime.panicindex): /go/src/pkg/runtime/runtime.c:85
4(main.utf8MoveBackwards): c:/temp/github/gocode/apropos.go:21
5(main.(*AutoCompleteContext).deduceDecl): c:/temp/github/gocode/apropos.go:130
6(main.(*AutoCompleteContext).Apropos): c:/temp/github/gocode/autocompletecontext.go:216
7(main.Server_AutoComplete): c:/temp/github/gocode/server.go:82
8(main.(*RPCRemote).RPCServer_AutoComplete): c:/temp/github/gocode/rpc.go:27
9(reflect.internalValue.call): c:/go/src/pkg/reflect/value.go:595
10(reflect.Value.Call): c:/go/src/pkg/reflect/value.go:445
11(rpc.(*service).call): c:/go/src/pkg/rpc/server.go:341
12(runtime.goexit): /go/src/pkg/runtime/proc.c:246
from gocode.
Hm, thanks, I've seen that error in the past. Can't remember what was wrong though.. Basically some kind of data is incorrect. This function "utf8MoveBackwards" is called when the editor issues autocompletion and gocode needs to move cursor back to the point where it can do autocompletion. And error originates from the point where no checks were performed, it simply takes the cursor position, moves it back and tries to access the buffer. I guess something of these two must be wrong. The cursor position or the contents of the buffer. Could be a vim script that fails to send the right data or something else.
Well.. I don't know, check these two vars by yourself somewhere around the error, 'file' should contain the buffer of the file you're editting and 'cursor' is an offset in bytes from the beginning of the buffer to the cursor position. If one of these is incorrect try to figure out why.
I'll try to reproduce the bug on my windows machine, but I don't know when I will be there and if it can be reproduced at all.
Also I strongly recommend you to use at least weekly versions. It's hard for me to work on abstract 'hg tip', because at the time when I will get to my windows machine most likely it's different 'hg tip' already.
from gocode.
One reason I can imagine why it may happen, is vim's "line2byte". I think vim needs to be compiled with +byte_offset option.
See vim --version
from gocode.
My vim --version
+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 +gettext/dyn -hangul_input +iconv/dyn
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
+multi_byte_ime/dyn +multi_lang -mzscheme -netbeans_intg +path_extra +perl/dyn
+persistent_undo -postscript +printer -profile +python/dyn -python3 +quickfix
+reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff
+startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl -tgetent -termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save -xpm_w32
from gocode.
well, it has +byte_offset, that's the only weird feature I use in vim
from gocode.
ok, I'll figure out it later. :)
from gocode.
was fixed by pull request 50
from gocode.
Related Issues (20)
- company-go trigger candidates not related! HOT 1
- no autocompletion for function in reference to a type struct
- panic: unknown export format version -1 HOT 1
- dial unix /tmp/gocode-daemon.wade.lee: connect: permission denied
- panic: rpc: can't find service RPC.RPC HOT 2
- Panics with unknown export format version -1 HOT 16
- Trouble compiling on save with go-plus and atom, not in terminal HOT 1
- Panics with GO version 1.11 HOT 5
- company-go can not complete golang third party package ? HOT 2
- GOCODE PANIC: Please check your code by "go build" HOT 3
- Gabage completion items when cursor is at the end of a keyword.
- In order for company-go to work with foreign packages, it requires a `-source` flag HOT 1
- How it works under go mod ? HOT 1
- Move gocode to github organization? HOT 4
- gocode work great again!!!
- Autocomplete isn't working with go1.14.3, getting version mismatch error. Does it support go1.14.3? HOT 2
- GOCODE DOES NOT WORK WITH OR WITHOUT GOMODULES ENABLED HOT 6
- working directory is not part of a module
- Questions about the network
- What is the font used in the example? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocode.