akiver / cs-demo-manager

Companion application for your Counter-Strike demos.
https://cs-demo-manager.com
MIT License
1.43k stars 196 forks source link

SourceTV analyze bug #724

Closed milkywayfarer closed 10 months ago

milkywayfarer commented 10 months ago

Describe the bug

When analyzing two demos that I recorded the same way (tv_autorecord command, then play 2 maps on a local server), only one is analyzed correctly, but another one panics the backend. Note that the one that panics has a huge warmup section, that might be the factor.

Demo links

Working demo Panicking demo

Steps to reproduce

  1. Start the application
  2. Go to Demos section
  3. Double-click the demo and hit Analyze
  4. Analysis stops abruptly without reporting the error to the frontend
  5. Go to Analyses section to read the log

Expected behavior

Expected analysis to work as for another demo that was recorded the same way.

How often does this bug happen?

Only once

Log file

Grenade nil in decoy start event
property 'm_bInBuyZone' not found
stacktrace:
goroutine 18 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x5e
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.NewParserWithConfig.func1({0x13e9520?, 0xc0009a5af0})
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/parser.go:388 +0x2f
github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover.func1()
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:197 +0x3b
panic({0x13e9520?, 0xc0009a5af0?})
    runtime/panic.go:914 +0x21f
github.com/markus-wa/godispatch.callConsumerCode.func1()
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:122 +0x54
panic({0x13802e0?, 0xc0009a5ae0?})
    runtime/panic.go:914 +0x21f
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/sendtables2.(*Entity).PropertyValueMust(0x13806e0?, {0x14a5b44, 0xc})
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/sendtables2/entity.go:163 +0x134
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/common.getBool({0x1517c60?, 0xc001734c40?}, {0x14a5b44?, 0x1?})
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/common/entity_util.go:42 +0x4d
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/common.(*Player).IsInBuyZone(0xc000b80340)
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/common/player.go:241 +0x45
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs.(*parser).bindWeaponS2.func2()
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/datatables.go:1043 +0x76
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/sendtables2.(*Entity).Destroy(...)
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/sendtables2/entity.go:245
github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/sendtables2.(*Parser).OnPacketEntities(0xc000180af0, 0xc0024af790)
    github.com/markus-wa/demoinfocs-golang/v4@v4.0.0/pkg/demoinfocs/sendtables2/entity.go:545 +0x903
reflect.Value.call({0x13998e0?, 0xc0001ac7c8?, 0xc0003717a0?}, {0x14a3108, 0x4}, {0xc001227ef8, 0x1, 0x1?})
    reflect/value.go:596 +0xce7
reflect.Value.Call({0x13998e0?, 0xc0001ac7c8?, 0x58?}, {0xc001227ef8?, 0xb40000c00019f001?, 0x4?})
    reflect/value.go:380 +0xb9
github.com/markus-wa/godispatch.callConsumerCode({0x13998e0?, 0xc0001ac7c8?, 0x13f7da0?}, {0xc001227ef8?, 0x1016786?, 0x0?})
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:125 +0x3f
github.com/markus-wa/godispatch.(*Dispatcher).Dispatch(0xc00019c780, {0x1480ca0, 0xc0024af790})
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:111 +0x1d4
github.com/markus-wa/godispatch.(*Dispatcher).dispatchWithRecover(0xc00019c780?, {0x1480ca0?, 0xc0024af790?})
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:202 +0x4f
github.com/markus-wa/godispatch.(*Dispatcher).dispatchQueue(0xc00019c780, 0x0?)
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:177 +0xd0
created by github.com/markus-wa/godispatch.(*Dispatcher).AddQueues in goroutine 1
    github.com/markus-wa/godispatch@v1.4.1/dispatch.go:162 +0x18a

Environment information

Version: 3.0.7 OS: darwin x64 23.2.0 Electron: 28.0.0 Chrome: 120.0.6099.56 Last database migrations: v1 - 2023-12-27T07:44:27.131Z

Additional context

No response

akiver commented 10 months ago

It will be fixed with https://github.com/markus-wa/demoinfocs-golang/pull/488. Please note that demos from private servers are not officially supported and data may be incorrect.