Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panics with deoplete-go on Windows #424

Closed
xelra opened this issue Feb 18, 2017 · 8 comments
Closed

Panics with deoplete-go on Windows #424

xelra opened this issue Feb 18, 2017 · 8 comments

Comments

@xelra
Copy link

xelra commented Feb 18, 2017

I'm trying to use deoplete-go in Windows in Neovim, which builds on top of gocode.

Unfortunately I get [deoplete] gocode panicked errors. I'm still seeing completions though.

Here is the output of gocode -s -debug for one such error:

2017/02/18 01:26:13 Go project path: hello
2017/02/18 01:26:13 Got autocompletion request for 'C:\Users\xelra\go\src\hello\hello.go'
2017/02/18 01:26:13 Cursor at: 83
panic: runtime error: slice bounds out of range
1(runtime.call32): C:/Go/src/runtime/asm_amd64.s:514
2(runtime.gopanic): C:/Go/src/runtime/panic.go:489
3(runtime.panicslice): C:/Go/src/runtime/panic.go:35
4(main.server_auto_complete): C:/Users/xelra/go/src/github.com/nsf/gocode/server.go:190
5(main.(*RPC).RPC_auto_complete): C:/Users/xelra/go/src/github.com/nsf/gocode/rpc.go:26
6(runtime.call64): C:/Go/src/runtime/asm_amd64.s:515
7(reflect.Value.call): C:/Go/src/reflect/value.go:434
8(reflect.Value.Call): C:/Go/src/reflect/value.go:302
9(net/rpc.(*service).call): C:/Go/src/net/rpc/server.go:387
10(runtime.goexit): C:/Go/src/runtime/asm_amd64.s:2197

This is my go env:

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\xelra\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2

@zchee
Copy link
Contributor

zchee commented Feb 18, 2017

@xelra Hi, I'm deoplete-go author, also gocode contributor.
IIRC it seems to deoplete-go bug(maybe) But I don't know what your edited Go sources.
So, Could you re-post to deoplete-go issue with sample Go sources?

Thanks.

@nsf
Copy link
Owner

nsf commented Feb 18, 2017

Seems like plugin passes cursor position outside of boundaries of the currently edited file. A source code example would be nice indeed. I also added some code for debug mode which does the boundaries check for cursor. It would yield a more useful error message. However it won't include the source code still though.

@zchee
Copy link
Contributor

zchee commented Feb 18, 2017

@nsf Yeah, maybe I think my plugin was get the wrong buffer or cursor position.
Thanks for adding the useful debug log message :)

@xelra
Copy link
Author

xelra commented Feb 18, 2017

As requested, I've created a cross-issue on zchee/deoplete-go.

The source code is a simple "hello world" file:

package main

import "fmt"

func main() {
    fmt.Printf("hello, world\n")
}

@zchee
Copy link
Contributor

zchee commented Mar 22, 2017

@xelra Are you still have this issue? If so, As @nsf said,

Seems like plugin passes cursor position outside of boundaries of the currently edited file

I think too, because if you tested with posted "hello world" file, that end of byte offset is 75. So 83 offset is impossible.

.
.
2017/02/18 01:26:13 Cursor at: 83
.
.

I think this issue is not gocode side, maybe Neovim's API(or wrong get offset by the deoplete-go). I'll create Windows10 VM on VMWare and try to test it.
Anyway, It seems better to close this issue.

@xelra
Copy link
Author

xelra commented Mar 22, 2017

Yes, I'm still having this issue. I just set it up on another Windows 10 Professional machine and it's exactly the same. Latest version of everything: Neovim, Neovim-Qt, gocode, deoplete.nvim and deoplete-go.

@zchee
Copy link
Contributor

zchee commented Mar 22, 2017

@xelra I see.
I'm macOS but works fine. So it certainly seems to be only of Windows issue.
If Neovim's API is wrong, another plugin will also have the same issue. I want to try to investigate this issue.

OK, Let's close this issue and move the discussion place there:
deoplete-plugins/deoplete-go#94

@xelra xelra closed this as completed Mar 22, 2017
@Shougo
Copy link

Shougo commented Feb 2, 2018

I get the reason.
It seems deoplete-go error.
I will fix it later.

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

No branches or pull requests

4 participants