Tencent / LuaHelper

LuaHelper is a High-performance lua VSCode plugin, Language Server Protocol for lua.
Other
631 stars 94 forks source link

插件一直报错,连接已关闭 #88

Closed kasuganosoras closed 2 years ago

kasuganosoras commented 2 years ago

问题

经常写着代码突然弹出日志窗口提示错误,很影响体验,完全没法正常用

image

环境

错误内容

[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/jrpc2@v0.13.1/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/jrpc2@v0.13.1/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/jrpc2@v0.13.1/server.go:351 +0x1ae
github.com/yinfei8/jrpc2.(*Server).dispatch.func1.1()
    D:/Go/gopath/pkg/mod/github.com/yinfei8/jrpc2@v0.13.1/server.go:233 +0xec
created by github.com/yinfei8/jrpc2.(*Server).dispatch.func1
    D:/Go/gopath/pkg/mod/github.com/yinfei8/jrpc2@v0.13.1/server.go:236 +0x15e
yinfei8 commented 2 years ago

多谢,反馈,是有一处崩溃,这个星期内会解决。

yinfei8 commented 2 years ago

多谢反馈,最新的0.2.12版本修复了

a83376750 commented 2 years ago

离线安装后,在最新的0.2.12版本也出现这个问题,运行这个插件的是没有联网的

yinfei8 commented 2 years ago

版本

有没有报错的日志,能否贴一下。当链接断掉之后,会有错误日志的。

image
a83376750 commented 2 years ago

这是内网机,访问不了外网的,我离线安装,打开随便一个lua就弹出这个,这个我在群里也反馈了

------------------ 原始邮件 ------------------ 发件人: "Tencent/LuaHelper" @.>; 发送时间: 2022年3月31日(星期四) 下午4:38 @.>; @.**@.>; 主题: Re: [Tencent/LuaHelper] 插件一直报错,连接已关闭 (Issue #88)

版本

有没有报错的日志,能否贴一下。当链接断掉之后,会有错误日志的。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

a83376750 commented 2 years ago

lua插件版本是v0.2.12

------------------ 原始邮件 ------------------ 发件人: "Tencent/LuaHelper" @.>; 发送时间: 2022年3月31日(星期四) 下午4:38 @.>; @.**@.>; 主题: Re: [Tencent/LuaHelper] 插件一直报错,连接已关闭 (Issue #88)

版本

有没有报错的日志,能否贴一下。当链接断掉之后,会有错误日志的。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>