Mrs4s / go-cqhttp

cqhttp的golang实现,轻量、原生跨平台.
GNU Affero General Public License v3.0
10.41k stars 1.63k forks source link

[Bug]: 启动报错 #2045

Closed axiangcoding closed 1 year ago

axiangcoding commented 1 year ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

go-cqhttp 版本

1.0.0

运行环境

Windows (64)

运行架构

None

连接方式

HTTP

使用协议

1 | Android Phone

重现步骤

启动报错,并报错

期望的结果是什么?

启动正常

实际的结果是什么?

启动报错

简单的复现代码/链接(可选)

No response

日志记录(可选)

[2023-04-03 02:32:12] [INFO]: 当前版本:(devel) 
[2023-04-03 02:32:12] [INFO]: 将使用 device.json 内的设备信息运行Bot. 
[2023-04-03 02:32:12] [INFO]: Bot将在5秒后登录并开始信息处理, 按 Ctrl+C 取消. 
[2023-04-03 02:32:17] [INFO]: 开始尝试登录并同步消息... 
[2023-04-03 02:32:17] [INFO]: 使用协议: Android Phone 8.9.35.10440 
[2023-04-03 02:32:18] [INFO]: 正在检查协议更新... 
[2023-04-03 02:32:19] [INFO]: 协议版本已更新: 8.9.35.10440 -> 8.9.38.10545 
[2023-04-03 02:32:19] [INFO]: Protocol -> connect to server: 183.47.101.153:8080 
[2023-04-03 02:32:19] [WARNING]: Protocol -> device lock is disable. http api may fail. 
[2023-04-03 02:32:28] [INFO]: 登录成功 欢迎使用: xxx
[2023-04-03 02:32:28] [INFO]: 开始加载好友列表... 
[2023-04-03 02:32:28] [INFO]: 共加载 3 个好友. 
[2023-04-03 02:32:28] [INFO]: 开始加载群列表... 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x51c259]

goroutine 145 [running]:
compress/flate.(*decompressor).huffSym(0xc00040a000, 0xc00040a028)
        /usr/local/go/src/compress/flate/inflate.go:719 +0xf9
compress/flate.(*decompressor).huffmanBlock(0xc00040a000?)
        /usr/local/go/src/compress/flate/inflate.go:494 +0x45
compress/flate.(*decompressor).nextBlock(0xc00040a000)
        /usr/local/go/src/compress/flate/inflate.go:327 +0x19c
compress/flate.(*decompressor).Read(0xc00040a000, {0xc0003f8000, 0x200, 0x0?})
        /usr/local/go/src/compress/flate/inflate.go:347 +0x7e
compress/zlib.(*reader).Read(0xc0000c4cd0, {0xc0003f8000, 0xc0000c4cd0?, 0x200})
        /usr/local/go/src/compress/zlib/reader.go:97 +0x57
bytes.(*Buffer).ReadFrom(0xc000121cd0, {0x7fe7133ad900, 0xc0000c4cd0})
        /usr/local/go/src/bytes/buffer.go:202 +0x98
github.com/Mrs4s/MiraiGo/binary.ZlibUncompress({0xc000419000, 0x4b22, 0x4b22})
        /go/pkg/mod/github.com/!mrs4s/!mirai!go@v0.0.0-20230401072048-f8d9841755b5/binary/utils.go:36 +0x14a
github.com/Mrs4s/MiraiGo/client/internal/network.(*Transport).readSSOFrame(0x4546554137565040?, 0xc0000c4c80, {0xc00041400a?, 0x4b80?, 0x4b80?})
        /go/pkg/mod/github.com/!mrs4s/!mirai!go@v0.0.0-20230401072048-f8d9841755b5/client/internal/network/response.go:89 +0x798
github.com/Mrs4s/MiraiGo/client/internal/network.(*Transport).ReadResponse(0xc0002b0060, {0xc0003fa000, 0x4b94, 0x4b94})
        /go/pkg/mod/github.com/!mrs4s/!mirai!go@v0.0.0-20230401072048-f8d9841755b5/client/internal/network/response.go:52 +0x31b
github.com/Mrs4s/MiraiGo/client.(*QQClient).netLoop(0xc0002cc000)
        /go/pkg/mod/github.com/!mrs4s/!mirai!go@v0.0.0-20230401072048-f8d9841755b5/client/network.go:356 +0x211
created by github.com/Mrs4s/MiraiGo/client.(*QQClient).connect.func1
        /go/pkg/mod/github.com/!mrs4s/!mirai!go@v0.0.0-20230401072048-f8d9841755b5/client/network.go:181 +0x1c5


### 补充说明(可选)

_No response_
Marhoosh commented 1 year ago

zclkkk commented 1 year ago

+1

Mrs4s commented 1 year ago

请尝试最新版本