dotabuff/yasha

Yasha crashing while parsing new 6.84 replay

xmakro opened this issue · 1 comments

http://www.dotabuff.com/matches/1453266084

panic: Out of range

goroutine 1 [running]:
github.com/dotabuff/yasha/utils.(_BitReader).ReadUBits(0xc20b554ba0, 0x8, 0x0)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:146 +0x96
github.com/dotabuff/yasha/utils.(_BitReader).ReadByte(0xc20b554ba0, 0x0)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:189 +0x31
github.com/dotabuff/yasha/utils.(_BitReader).ReadBytes(0xc20b554ba0, 0x4, 0x0, 0x0, 0x0)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:198 +0xe9
github.com/dotabuff/yasha/utils.(_BitReader).ReadBitFloat(0xc20b554ba0, 0x2b)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:204 +0x44
github.com/dotabuff/yasha/utils.(_BitReader).ReadSpecialFloat(0xc20b554ba0, 0xc20a662690, 0xc20a658820)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:352 +0x250
github.com/dotabuff/yasha/utils.(_BitReader).ReadFloat(0xc20b554ba0, 0xc20a662690, 0xc20b5600c0)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:280 +0x3a
github.com/dotabuff/yasha/utils.(_BitReader).ReadPropertiesValues(0xc20b554ba0, 0xc20a664000, 0xcc, 0x100, 0xc20a63ba10, 0xc20b546800, 0xcc, 0x100, 0xc20b507560)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/utils/bit_reader.go:451 +0x554
github.com/dotabuff/yasha/string_tables.(_StateHelper).updateInstanceBaselineItem(0xc2080c4000, 0xc20b481e00)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/string_tables/state_helper.go:218 +0x350
github.com/dotabuff/yasha/string_tables.(_StateHelper).updateInstanceBaseline(0xc2080c4000, 0xc20b479980)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/string_tables/state_helper.go:187 +0x10f
github.com/dotabuff/yasha/string_tables.(_StateHelper).OnCST(0xc2080c4000, 0x0, 0xc2080ba310)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/string_tables/state_helper.go:125 +0x653
github.com/dotabuff/yasha/string_tables.(_StateHelper).AppendPacket(0xc2080c4000, 0xc2080b0c60)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/string_tables/state_helper.go:84 +0x1f3
github.com/dotabuff/yasha.(_Parser).processTick(0xc2080c2000, 0x0, 0xc209df6000, 0x3d6, 0x400)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/parser.go:189 +0x3a1
github.com/dotabuff/yasha.func·001(0xc20a102240)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/parser.go:140 +0x6d
github.com/dotabuff/yasha/parser.(_Parser).AnalyzePacket(0xc20800a060, 0xc208033e98, 0x7, 0x2, 0xc209fc7dc0, 0x65, 0x65)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/parser/parser.go:137 +0x699
github.com/dotabuff/yasha/parser.(_Parser).Analyze(0xc20800a060, 0xc208033e98)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/parser/parser.go:84 +0x49a
github.com/dotabuff/yasha.(*Parser).Parse(0xc2080c2000)
/home/makro/applications/gocode/src/github.com/dotabuff/yasha/parser.go:148 +0x70b
main.main()
/home/makro/labs/dotatv/parser2.go:102 +0x434

This should be fixed by #5 would be nice if you could test your cases.