Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.1运行mmo_game_client出现报错,求指教w #235

Open
csgopher opened this issue May 29, 2023 · 1 comment
Open

v1.1.1运行mmo_game_client出现报错,求指教w #235

csgopher opened this issue May 29, 2023 · 1 comment

Comments

@csgopher
Copy link

=====> Player pidId = 1 arrived ====
2023/05/29 22:53:22 [INFO]connection.go:133: [Reader Goroutine is running]
2023/05/29 22:53:25 [DEBUG]connection.go:192: read buffer 0a000000030000000d000027431d00000943
2023/05/29 22:55:43 [INFO]panic.go:890: 127.0.0.1:51599 [conn Reader exit!]
2023/05/29 22:55:45 [INFO]connmanager.go:41: connection Remove ConnID=0 successfully: conn num = 0
2023/05/29 22:55:45 [INFO]connection.go:428: Conn Stop()...ConnID = 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xcd6480]

goroutine 34 [running]:
encoding/binary.Read({0xf5d4e8, 0xc000224b40}, {0x0, 0x0}, {0xed16a0, 0xc000204208})
C:/env/go1.20/go1.20.4/src/encoding/binary/binary.go:248 +0x740
github.com/aceld/zinx/zcode.(*EncoderData).getUnadjustedFrameLength(0xc000098080, 0xc000224b10, 0x4, 0x4, {0x0, 0x0})
C:/env/gopath/pkg/mod/github.com/aceld/zinx@v1.1.1/zcode/lengthfieldframedecoder.go:269 +0x3eb
github.com/aceld/zinx/zcode.(*EncoderData).decode(0xc000098080, {0xc000218048, 0x12, 0x18})
C:/env/gopath/pkg/mod/github.com/aceld/zinx@v1.1.1/zcode/lengthfieldframedecoder.go:354 +0x159
github.com/aceld/zinx/zcode.(*EncoderData).Decode(0xc000098080, {0xc000260000, 0x12, 0x400})
C:/env/gopath/pkg/mod/github.com/aceld/zinx@v1.1.1/zcode/lengthfieldframedecoder.go:408 +0x295
github.com/aceld/zinx/znet.(*Connection).StartReader(0xc0000d20d0)
C:/env/gopath/pkg/mod/github.com/aceld/zinx@v1.1.1/znet/connection.go:195 +0x655
created by github.com/aceld/zinx/znet.(*Connection).Start
C:/env/gopath/pkg/mod/github.com/aceld/zinx@v1.1.1/znet/connection.go:217 +0x13f

玩家可以上线,但是一移动就会出现报错,服务器就停了

@aceld
Copy link
Owner

aceld commented Jun 5, 2023

zinx用最新的master试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants