We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug During demo processing, demo processing crashes 2024/04/28 22:36:21 failed to parse demo: failed to parse CMsgPlayerInfo msg: proto: cannot parse invalid wire-format data
To Reproduce Download link to an affected demo: HLTV, ESEA, Matchmaking share link or other https://www.faceit.com/en/csgo/room/1-1d796568-6470-439d-8606-2a630fc83aa3
Code:
func main() { f, err := os.Open("1-1d796568-6470-439d-8606-2a630fc83aa3-1-1.dem") if err != nil { log.Panic("failed to open demo file: ", err) } defer f.Close() p := demoinfocs.NewParser(f) defer p.Close() // Register handler on kill events p.RegisterEventHandler(func(e events.Kill) { var hs string if e.IsHeadshot { hs = " (HS)" } var wallBang string if e.PenetratedObjects > 0 { wallBang = " (WB)" } fmt.Printf("%s <%v%s%s> %s\n", e.Killer, e.Weapon, hs, wallBang, e.Victim) }) // Parse to end err = p.ParseToEnd() if err != nil { log.Panic("failed to parse demo: ", err) } }
Expected behavior Demo processes, lists kill events.
Library version v4 v4.1.3
Additional context Full stack trace
... Fre-e- <World> Fre-e- ranch <World> ranch SweatyMcRib <World> SweatyMcRib 2024/04/28 22:36:21 failed to parse demo: failed to parse CMsgPlayerInfo msg: proto: cannot parse invalid wire-format data stacktrace: goroutine 6 [running]: runtime/debug.Stack() /opt/homebrew/opt/go/libexec/src/runtime/debug/stack.go:24 +0x64 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.NewParserWithConfig.func1({0x1009e5840, 0x14001ce3600}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/parser.go:403 +0x2c github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover.func1() ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:197 +0x48 panic({0x1009e5840?, 0x14001ce3600?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/godispatch.callConsumerCode.func1() ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:122 +0x60 panic({0x1009e4d00?, 0x14001422120?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.recoverFromUnexpectedEOF({0x1009e4d00, 0x14001422120}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/parsing.go:171 +0x140 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTable.func1() ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:143 +0x30 panic({0x1009e4d00?, 0x14001422120?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).parseUserInfo(0x140001c9c00, {0x14001206c8c, 0x3, 0x3}, 0xa) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:601 +0x280 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).processStringTableS2(0x140001c9c00, {0x140000455d8?, 0x0?, 0x0?}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:434 +0x17c github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).processStringTable(0x140001c9c00, {0x140000455d8?, 0x0?, 0x0?}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:458 +0x150 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTable(0x0?, 0x0?, 0x0?) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:160 +0x1ec github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTableS2(...) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:178 reflect.Value.call({0x10098ff80?, 0x14000030b60?, 0x14000045dd8?}, {0x100905866, 0x4}, {0x14000045ee0, 0x1, 0x1006fa4f4?}) /opt/homebrew/opt/go/libexec/src/reflect/value.go:596 +0x970 reflect.Value.Call({0x10098ff80?, 0x14000030b60?, 0x14000045e48?}, {0x14000045ee0?, 0x2d0481c07feb9?, 0x6c000001009a6d60?}) /opt/homebrew/opt/go/libexec/src/reflect/value.go:380 +0x94 github.com/markus-wa/godispatch.callConsumerCode({0x10098ff80?, 0x14000030b60?, 0x14000045ef8?}, {0x14000045ee0?, 0x14000045ea8?, 0x1006a9eac?}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:125 +0x44 github.com/markus-wa/godispatch.(*Dispatcher).Dispatch(0x1400004a360, {0x100a26380, 0x14001aa1810}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:111 +0x214 github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover(0x1400004a360?, {0x100a26380?, 0x14001aa1810?}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:202 +0x50 github.com/markus-wa/godispatch.(*Dispatcher).dispatchQueue(0x1400004a360, 0x1400004a420) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:177 +0xcc created by github.com/markus-wa/godispatch.(*Dispatcher).AddQueues in goroutine 1 ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:162 +0x1ac panic: failed to parse demo: failed to parse CMsgPlayerInfo msg: proto: cannot parse invalid wire-format data stacktrace: goroutine 6 [running]: runtime/debug.Stack() /opt/homebrew/opt/go/libexec/src/runtime/debug/stack.go:24 +0x64 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.NewParserWithConfig.func1({0x1009e5840, 0x14001ce3600}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/parser.go:403 +0x2c github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover.func1() ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:197 +0x48 panic({0x1009e5840?, 0x14001ce3600?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/godispatch.callConsumerCode.func1() ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:122 +0x60 panic({0x1009e4d00?, 0x14001422120?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.recoverFromUnexpectedEOF({0x1009e4d00, 0x14001422120}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/parsing.go:171 +0x140 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTable.func1() ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:143 +0x30 panic({0x1009e4d00?, 0x14001422120?}) /opt/homebrew/opt/go/libexec/src/runtime/panic.go:770 +0x124 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).parseUserInfo(0x140001c9c00, {0x14001206c8c, 0x3, 0x3}, 0xa) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:601 +0x280 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).processStringTableS2(0x140001c9c00, {0x140000455d8?, 0x0?, 0x0?}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:434 +0x17c github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).processStringTable(0x140001c9c00, {0x140000455d8?, 0x0?, 0x0?}) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:458 +0x150 github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTable(0x0?, 0x0?, 0x0?) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:160 +0x1ec github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).handleUpdateStringTableS2(...) ~/go/pkg/mod/github.com/markus-wa/demoinfocs-golang/v4@v4.1.3/pkg/demoinfocs/stringtables.go:178 reflect.Value.call({0x10098ff80?, 0x14000030b60?, 0x14000045dd8?}, {0x100905866, 0x4}, {0x14000045ee0, 0x1, 0x1006fa4f4?}) /opt/homebrew/opt/go/libexec/src/reflect/value.go:596 +0x970 reflect.Value.Call({0x10098ff80?, 0x14000030b60?, 0x14000045e48?}, {0x14000045ee0?, 0x2d0481c07feb9?, 0x6c000001009a6d60?}) /opt/homebrew/opt/go/libexec/src/reflect/value.go:380 +0x94 github.com/markus-wa/godispatch.callConsumerCode({0x10098ff80?, 0x14000030b60?, 0x14000045ef8?}, {0x14000045ee0?, 0x14000045ea8?, 0x1006a9eac?}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:125 +0x44 github.com/markus-wa/godispatch.(*Dispatcher).Dispatch(0x1400004a360, {0x100a26380, 0x14001aa1810}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:111 +0x214 github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover(0x1400004a360?, {0x100a26380?, 0x14001aa1810?}) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:202 +0x50 github.com/markus-wa/godispatch.(*Dispatcher).dispatchQueue(0x1400004a360, 0x1400004a420) ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:177 +0xcc created by github.com/markus-wa/godispatch.(*Dispatcher).AddQueues in goroutine 1 ~/go/pkg/mod/github.com/markus-wa/godispatch@v1.4.1/dispatch.go:162 +0x1ac goroutine 1 [running]: log.Panic({0x14000d99f08?, 0x10098f200?, 0x100a991a0?}) /opt/homebrew/opt/go/libexec/src/log/log.go:432 +0x60 main.main() ~/GolandProjects/demoParseTesting/dpt.go:37 +0x1c0 exit status 2
The text was updated successfully, but these errors were encountered:
userid
player_connect
fix: incomplete stringtables parsing
a22e220
fix #539 fix #532 fix #525
Could you try with this branch? #540
Sorry, something went wrong.
Tested a handful of demos including the one mentioned above. Those all work great on the stringtable branch.
97d31d8
adb29b1
No branches or pull requests
Describe the bug
During demo processing, demo processing crashes
2024/04/28 22:36:21 failed to parse demo: failed to parse CMsgPlayerInfo msg: proto: cannot parse invalid wire-format data
To Reproduce
Download link to an affected demo: HLTV, ESEA, Matchmaking share link or other
https://www.faceit.com/en/csgo/room/1-1d796568-6470-439d-8606-2a630fc83aa3
Code:
Expected behavior
Demo processes, lists kill events.
Library version
v4 v4.1.3
Additional context
Full stack trace
The text was updated successfully, but these errors were encountered: