gocode: Panics with unknown export format version -1

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): C:/Go191/src/runtime/asm_amd64.s:509
2(runtime.gopanic): C:/Go191/src/runtime/panic.go:491
3(main.(*gc_bin_parser).parse_export): C:/Go/bin/src/github.com/nsf/gocode/package_bin.go:126
4(main.(*package_file_cache).process_package_data): C:/Go/bin/src/github.com/nsf/gocode/package.go:132
5(main.(*package_file_cache).update_cache): C:/Go/bin/src/github.com/nsf/gocode/package.go:92
6(main.update_packages.func1): C:/Go/bin/src/github.com/nsf/gocode/autocompletecontext.go:455
7(runtime.goexit): C:/Go191/src/runtime/asm_amd64.s:2337

Not sure what needs clearing/removing.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 17
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Hm, turns out my test case was wrong, it works for me with Go 1.11beta2 and mdempksy’s fork at https://github.com/mdempsky/gocode

The fork at https://github.com/mdempsky/gocode fixes this issue.

Okay, I found it, it’s called indexed export format and has been introduced recently: https://groups.google.com/forum/#!msg/golang-codereviews/6vqMfk1krNU/lzoJtkbuCQAJ

Some more info: https://groups.google.com/forum/#!topic/golang-dev/Lj_B-O6OMv8

Gocode is no longer maintained, you can try a fork, such as: https://github.com/mdempsky/gocode