redraskal / r6-dissect

Match Replay API/CLI for Rainbow Six: Siege's Dissect (.rec) format.
MIT License
70 stars 11 forks source link

Can't analyze any match replay after `v0.21.1` release #99

Closed f870103 closed 4 months ago

f870103 commented 4 months ago

Describe the bug v0.21.1 is not able to analyze any match replay.

To Reproduce Steps to reproduce the behavior:

  1. Try to analyze any Y9S2.2 match.
  2. Received the following error message:

    PS E:\Uplay\games\Tom Clancy's Rainbow Six Siege\MatchReplay> .\r6-dissect.exe -f json -o 1.json .\Match-2024-07-21_03-08-51-27\
    panic: role unknown for operator ID 0
    
    goroutine 1 [running]:
    github.com/redraskal/r6-dissect/dissect.Operator.Role(...)
        /github/workspace/dissect/operator_roles.go:86
    github.com/redraskal/r6-dissect/dissect.readSpawn(0xc006e62248)
        /github/workspace/dissect/site.go:32 +0x505
    github.com/redraskal/r6-dissect/dissect.(*Reader).Read(0xc006e62248)
        /github/workspace/dissect/reader.go:221 +0x543
    github.com/redraskal/r6-dissect/dissect.(*MatchReader).read(0xc0002f4460, 0x3)
        /github/workspace/dissect/match.go:73 +0x210
    github.com/redraskal/r6-dissect/dissect.(*MatchReader).Read(...)
        /github/workspace/dissect/match.go:78
    main.writeMatch(0x50e015?, {0xc00009e090, 0x4}, {0x59a780, 0xc0000901f8})
        /github/workspace/main.go:155 +0x72
    main.main()
        /github/workspace/main.go:64 +0x547

Expected behavior The commands should function as they did prior to the latest release, providing match info and exporting files correctly.

redraskal commented 4 months ago

uh that is weird, i will look at it tomorrow

redraskal commented 4 months ago

how many players were in the match related to the error? also, could u send me that replay?

redraskal commented 4 months ago

actually, this is probably a trivial fix. just surprised it's an issue

f870103 commented 4 months ago

how many players were in the match related to the error? also, could u send me that replay?

I only played Standard yesterday, so it could only be 10 players.

Match-2024-07-21_02-51-36-190-R01.zip Match-2024-07-21_02-51-36-190-R02.zip Match-2024-07-21_02-51-36-190-R03.zip Match-2024-07-21_02-51-36-190-R04.zip

redraskal commented 4 months ago

site.go sets defense player "spawn" when the "site" is found. i'm checking the operator role (attack/defense) for each player. the role should never be checked if the "operator" is 0, which would mean the player disconnected or fetching the chosen operator broke.