问题
经常写着代码突然弹出日志窗口提示错误,很影响体验,完全没法正常用
环境
- 系统:Windows 11
- 网络:广东电信 / 香港梯子(国内白名单模式)
- VSCode Insider 版本
- Lua Helper:v0.2.11
错误内容
[Info - 09:06:18] Connection to server got closed. Server will restart.
[Error - 09:06:18] Request textDocument/documentHighlight failed.
Error: Connection got disposed.
at Object.dispose (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\connection.js:1061:27)
at Object.dispose (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-languageclient\lib\common\client.js:73:35)
at LanguageClient.handleConnectionClosed (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-languageclient\lib\common\client.js:2474:42)
at LanguageClient.handleConnectionClosed (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-languageclient\lib\node\main.js:159:15)
at closeHandler (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-languageclient\lib\common\client.js:2461:18)
at CallbackList.invoke (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
at Emitter.fire (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
at closeHandler (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\connection.js:260:26)
at CallbackList.invoke (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\events.js:55:39)
at Emitter.fire (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\events.js:117:36)
at StreamMessageReader.fireClose (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\messageReader.js:40:27)
at Socket.<anonymous> (c:\Users\Akkariin\.vscode-insiders\extensions\yinfei.luahelper-0.2.11\node_modules\vscode-jsonrpc\lib\common\messageReader.js:125:42)
at Socket.emit (node:events:402:35)
at Pipe.<anonymous> (node:net:687:12)
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x68 pc=0xf4cea9]
goroutine 600 [running]:
luahelper-lsp/langserver/check/results.(*FileResult).FindGlobalVarInfo(...)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/results/file_result.go:191
luahelper-lsp/langserver/check/analysis.(*Analysis).findGlobalVar(0xc0002cf680, 0xc00023330b, 0xc, 0x3, 0x0, 0x3, 0xc, 0x0, 0x0, 0xc000400000, ...)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_search.go:378 +0x549
luahelper-lsp/langserver/check/analysis.(*Analysis).findNameStr(0xc0002cf680, 0xc00040be60, 0x0)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_search.go:430 +0x23d
luahelper-lsp/langserver/check/analysis.(*Analysis).cgNameExp(0xc0002cf680, 0xc00040be60, 0x0)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_exp.go:69 +0x65
luahelper-lsp/langserver/check/analysis.(*Analysis).cgExp(0xc0002cf680, 0xff7180, 0xc00040be60, 0x0, 0x0, 0x0, 0x0)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_exp.go:22 +0x2eb
luahelper-lsp/langserver/check/analysis.(*Analysis).cgFuncCallStat(0xc0002cf680, 0xc00058d720)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_stat.go:47 +0x71
luahelper-lsp/langserver/check/analysis.(*Analysis).cgStat(0xc0002cf680, 0xff6f00, 0xc00058d720)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_stat.go:14 +0x4bd
luahelper-lsp/langserver/check/analysis.(*Analysis).cgBlock(0xc0002cf680, 0xc000216690)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis_block.go:10 +0x77
luahelper-lsp/langserver/check/analysis.(*Analysis).HandleTermTraverseAST(0xc0002cf680, 0x4, 0xc000426a50, 0x0)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/analysis/analysis.go:412 +0x132
luahelper-lsp/langserver/check.(*AllProject).handleFindferences(0xc000183110, 0xc0002cf5e0)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/check_lsp_references.go:29 +0x1f3
luahelper-lsp/langserver/check.(*AllProject).FindReferences(0xc000183110, 0xc000546840, 0x59, 0xc000129930, 0x3, 0xc00020acf0, 0x1, 0x1)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/check/check_lsp_references.go:128 +0x805
luahelper-lsp/langserver.(*LspServer).TextDocumentHighlight(0xc00019c140, 0x110ea20, 0xc00020ac30, 0xc0005467e0, 0x5d, 0x21000000c0, 0x0, 0x0, 0x0, 0x0, ...)
G:/companyproject/LuaHelper/github/LuaHelper/luahelper-lsp/langserver/textdocument_highlight.go:39 +0x247
reflect.Value.call(0x1019640, 0xc00006d050, 0x13, 0x108a7e1, 0x4, 0xc00020ac60, 0x2, 0x2, 0xc00020ac60, 0x199, ...)
D:/Go/src/reflect/value.go:476 +0x907
reflect.Value.Call(0x1019640, 0xc00006d050, 0x13, 0xc00020ac60, 0x2, 0x2, 0x2, 0xc00020ac60, 0x1)
D:/Go/src/reflect/value.go:337 +0xc5
github.com/yinfei8/jrpc2/handler.newHandler.func8(0x110ea20, 0xc00020ac30, 0xc0004be140, 0x1058680, 0xc00020ac30, 0x101db00, 0x1359c40)
D:/Go/gopath/pkg/mod/github.com/yinfei8/[email protected]/handler/handler.go:240 +0x1fb
github.com/yinfei8/jrpc2/handler.Func.Handle(0xc00006f440, 0x110ea20, 0xc00020ac30, 0xc0004be140, 0x0, 0x0, 0x110ea20, 0xc00020ac30)
D:/Go/gopath/pkg/mod/github.com/yinfei8/[email protected]/handler/handler.go:23 +0x4b
github.com/yinfei8/jrpc2.(*Server).invoke(0xc0001a0000, 0x110e978, 0xc0004be180, 0x1109300, 0xc00006f440, 0xc0004be140, 0x0, 0x0, 0x0, 0x0, ...)
D:/Go/gopath/pkg/mod/github.com/yinfei8/[email protected]/server.go:351 +0x1ae
github.com/yinfei8/jrpc2.(*Server).dispatch.func1.1()
D:/Go/gopath/pkg/mod/github.com/yinfei8/[email protected]/server.go:233 +0xec
created by github.com/yinfei8/jrpc2.(*Server).dispatch.func1
D:/Go/gopath/pkg/mod/github.com/yinfei8/[email protected]/server.go:236 +0x15e