小黑兔3.4.3登录报错,进不了游戏

Viewed 61

小黑兔版本:1.10.13
客户端版本:3.4.3.52237
服务端:AZ端

[2025/08/02 18:14:56] [✓] 服务器地址:cc.xxx.top:3724
[2025/08/02 18:14:56] [✓] 正在连接Auth服务器: cc.xxx.top
[2025/08/02 18:14:56] [✓] 连接Auth服务器成功
[2025/08/02 18:16:26] [✓] 服务器地址:cc.xxx.top:3724
[2025/08/02 18:16:26] [✓] 正在连接Auth服务器: cc.xxx.top
[2025/08/02 18:16:26] [✓] 连接Auth服务器成功
[2025/08/02 18:16:27] [✓] 正在连接到游戏服务器...
[2025/08/02 18:16:27] [✓] 游戏服务器连接成功
[2025/08/02 18:16:59] [💀] 致命错误 legacy1
[2025/08/02 18:16:59] [💀] goroutine 418 [running]:
sugar/lib/slog.Error({0xc0029e96d8, 0x1, 0x1})
	D:/heitu/workspace/sugar/lib/slog/method.go:137 +0x131
sugar/world.NewLegacyClient.func1.1()
	D:/heitu/workspace/sugar/world/legacy.go:134 +0x6e
panic({0x12d0b60, 0x75fef70})
	C:/go1.20.14/go1.20.14/src/runtime/panic.go:884 +0x213
sugar/world/handler_legacy/chat.SMSG_CHAT_7080(0xc00acf4790, 0xc0029ea720)
	D:/heitu/workspace/sugar/world/handler_legacy/chat/SMSG_CHAT.go:218 +0x998
sugar/world/handler_legacy/chat.SMSG_CHAT(0x12cc940?, 0xc000611830?)
	D:/heitu/workspace/sugar/world/handler_legacy/chat/SMSG_CHAT.go:105 +0x8e5
sugar/world.(*LegacyClient).HandlePacket(0xc00acf4790, 0xc0029ea720)
	D:/heitu/workspace/sugar/world/legacy_base_func.go:42 +0x163
sugar/world.NewLegacyClient.func1()
	D:/heitu/workspace/sugar/world/legacy.go:250 +0x72e
created by sugar/world.NewLegacyClient
	D:/heitu/workspace/sugar/world/legacy.go:131 +0x7dc
[2025/08/02 18:16:59] [💀] runtime error: invalid memory address or nil pointer dereference
[2025/08/02 18:16:59] [💀] goroutine 418 [running]:
sugar/lib/slog.Error({0xc0029e96d8, 0x1, 0x1})
	D:/heitu/workspace/sugar/lib/slog/method.go:137 +0x131
sugar/world.NewLegacyClient.func1.1()
	D:/heitu/workspace/sugar/world/legacy.go:135 +0x9a
panic({0x12d0b60, 0x75fef70})
	C:/go1.20.14/go1.20.14/src/runtime/panic.go:884 +0x213
sugar/world/handler_legacy/chat.SMSG_CHAT_7080(0xc00acf4790, 0xc0029ea720)
	D:/heitu/workspace/sugar/world/handler_legacy/chat/SMSG_CHAT.go:218 +0x998
sugar/world/handler_legacy/chat.SMSG_CHAT(0x12cc940?, 0xc000611830?)
	D:/heitu/workspace/sugar/world/handler_legacy/chat/SMSG_CHAT.go:105 +0x8e5
sugar/world.(*LegacyClient).HandlePacket(0xc00acf4790, 0xc0029ea720)
	D:/heitu/workspace/sugar/world/legacy_base_func.go:42 +0x163
sugar/world.NewLegacyClient.func1()
	D:/heitu/workspace/sugar/world/legacy.go:250 +0x72e
created by sugar/world.NewLegacyClient
	D:/heitu/workspace/sugar/world/legacy.go:131 +0x7dc
[2025/08/02 18:16:59] [✓] 与服务器链接断开
[2025/08/02 18:16:59] [✓] 与游戏客户端链接断开 链接类型 0
[2025/08/02 18:17:05] [✓] 服务器地址:cc.xxx.top:3724
[2025/08/02 18:17:05] [✓] 正在连接Auth服务器: cc.xxx.top
[2025/08/02 18:17:05] [✓] 连接Auth服务器成功
[2025/08/02 18:17:05] [✓] 正在连接到游戏服务器...
[2025/08/02 18:17:05] [✓] 游戏服务器连接成功

1 Answers

你的服务器在客户端发送 CMSG_PLAYER_LOGIN 协议之前

发送了 SMSG_CHAT 协议,导致的报错

修改一下这部分逻辑,给客户端发送聊天消息,要在客户端成功登录之后

不知道是不是因为服务器名字里面带有空格导致,是的话麻烦修复一下。

你的服务器在客户端发送 CMSG_PLAYER_LOGIN 协议之前,发送了 SMSG_CHAT 协议。导致的报错