gwuhaolin / livego

live video streaming server in golang
MIT License
9.67k stars 2k forks source link

panic: runtime error: index out of range [3] with length 0 goroutine 7639 [running]: encoding/binary.bigEndian.Uint32(...) /usr/lib/golang/src/encoding/binary/binary.go:112 #186

Open xianchuhan opened 3 years ago

xianchuhan commented 3 years ago

微信小程序推流崩溃到func (conn Conn) handleControlMsg(c ChunkStream) { if c.TypeID == idSetChunkSize { conn.remoteChunkSize = binary.BigEndian.Uint32(c.Data) } else if c.TypeID == idWindowAckSize { conn.remoteWindowAckSize = binary.BigEndian.Uint32(c.Data) } }

matthewgao commented 2 years ago

Needs more information to determine the root cause of the issue, or any reproduce step?

xianchuhan commented 2 years ago

Until this problem is that they are accurate, described again again, micro - applet live-pusher the letter just push the audio stream,chunksize declared letter small program size is 256, but the actual individual bag will send audio packet is greater than 256,livego should be to address this exception is not handled, leading to livego crash. A similar issue with micro - letter community linked below:

https://developers.weixin.qq.com/community/develop/doc/0002c84103c080f71e7c901af5ac00

------------------ 原始邮件 ------------------ 发件人: "gwuhaolin/livego" @.>; 发送时间: 2021年10月8日(星期五) 晚上11:17 @.>; @.**@.>; 主题: Re: [gwuhaolin/livego] panic: runtime error: index out of range [3] with length 0 goroutine 7639 [running]: encoding/binary.bigEndian.Uint32(...) /usr/lib/golang/src/encoding/binary/binary.go:112 (#186)

Needs more information to determine the root cause of the issue, or any reproduce step?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

xianchuhan commented 2 years ago

Until this problem is that they are accurate, described again again, micro - applet live-pusher the letter just push the audio stream,chunksize declared letter small program size is 256, but the actual individual bag will send audio packet is greater than 256,livego should be to address this exception is not handled, leading to livego crash. A similar issue with micro - letter community linked below: https://developers.weixin.qq.com/community/develop/doc/0002c84103c080f71e7c901af5ac00