panic
shuxiao9058 opened this issue · comments
Aaron Ji commented
revision:
commit bbf9de5da7bc4c11fb49e48085aa8d033c5e5084 (HEAD -> master, origin/master, origin/HEAD)
Merge: 2eccb12 686ef8a
Author: saibing <saibingdeng@gmail.com>
Date: Mon Mar 18 21:06:03 2019 +0800
Merge pull request #161 from imjustfly/master
fixed bug in code formatting
workspace tailf /tmp/bingo.log
langserver-go: reading on stdin, writing on stdout
panic serving textDocument/completion: illegal Pos value
goroutine 2037 [running]:
github.com/saibing/bingo/langserver/internal/util.Panicf(0x45571a0, 0x46f8310, 0x4620ead, 0x2, 0xc02fd296b8, 0x1, 0x1, 0xc02fd296c8, 0x405beb6)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/internal/util/util.go:116 +0x8c
github.com/saibing/bingo/langserver.(*LangHandler).Handle.func1(0xc014d506e0, 0xc02fd29ee0)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/handler.go:115 +0xc4
panic(0x45571a0, 0x46f8310)
/usr/local/Cellar/go/1.12.1/libexec/src/runtime/panic.go:522 +0x1b5
go/token.(*File).PositionFor(0xc010236480, 0x148a4a5, 0xc014ce7201, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.12.1/libexec/src/go/token/position.go:346 +0xbc
go/token.(*File).Position(...)
/usr/local/Cellar/go/1.12.1/libexec/src/go/token/position.go:357
github.com/saibing/bingo/langserver/internal/source.Completion(0x4710fe0, 0xc014ce7240, 0x4714600, 0xc000142150, 0x148a4a5, 0x47042a0, 0xc00019b5c0, 0x0, 0x0, 0x453b820, ...)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/internal/source/completion.go:76 +0x170e
github.com/saibing/bingo/langserver.(*LangHandler).handleTextDocumentCompletion(0xc00020a000, 0x4710fe0, 0xc014ce7240, 0x470ede0, 0xc000168200, 0xc014d506e0, 0xc011c55880, 0x38, 0xb6, 0x1, ...)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/completion.go:36 +0x1ff
github.com/saibing/bingo/langserver.(*LangHandler).Handle(0xc00020a000, 0x4710fe0, 0xc014ce7240, 0x470ede0, 0xc000168200, 0xc014d506e0, 0x0, 0x0, 0x0, 0x0)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/handler.go:274 +0x26a4
github.com/saibing/bingo/langserver.(*LangHandler).handle(...)
/usr/local/gopath/src/github.com/saibing/bingo/langserver/handler.go:105
github.com/sourcegraph/jsonrpc2.(*HandlerWithErrorConfigurer).Handle(0xc0001542a0, 0x4711020, 0xc00002a108, 0xc000168200, 0xc014d506e0)
/usr/local/gopath/pkg/mod/github.com/sourcegraph/jsonrpc2@v0.0.0-20180831160525-549eb959f029/handler_with_error.go:21 +0x73
created by github.com/saibing/bingo/langserver.lspHandler.Handle
/usr/local/gopath/src/github.com/saibing/bingo/langserver/handler.go:51 +0xfc
langserver-go: reading on stdin, writing on stdout
Benjamin Nelson commented
I see this same exception in my logs.
saibing commented
How to reproduce this problem?