agoragames / tassadar

A Starcraft 2 replay parser written in pure Ruby
https://github.com/agoragames/tassadar
MIT License
44 stars 20 forks source link

5 byte header on builds >= 17326. #15

Open joshleblanc opened 8 years ago

joshleblanc commented 8 years ago

Tassadar stopped working for me this past patch. Getting the following error:

c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/io.rb:83:in `readbytes': data truncated (IOError)
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/string.rb:110:in `read_and_return_value'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/base_primitive.rb:124:in `do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `block in do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `each'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/offset.rb:57:in `do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `block in do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `each'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in `do_read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/base.rb:146:in `read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/bindata-2.1.0/lib/bindata/base.rb:23:in `read'
        from c:/ruby21/lib/ruby/gems/2.1.0/gems/tassadar-0.3.0/lib/tassadar/sc2/replay.rb:14:in `initialize'
        from tmp.rb:2:in `new'
        from tmp.rb:2:in `<main>'

Took a looksi at sc2reader, and it looks like the header is now 5 bytes, while attributes.rb was looking for a 4 byte header. I could be wrong,

In any case, you get the above error when trying to read 3.5 replays.