GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

events with timestamps after replay.frames #87

Closed dsjoerg closed 11 years ago

dsjoerg commented 11 years ago

In WoL, we could rely on the fact that replay.frames was the length of the replay (in frames). And there would certainly not be any events with a frame timestamp after replay.frames.

Well not anymore.

import sc2reader replay = sc2reader.load_replay("http://dl.dropbox.com/sh/k9nl1w4lox9smsu/K26MovC2fE/sc2replays/2.0.0.23925/Korhal%20City%20%287%29.SC2Replay?dl=1") print replay.events[-1].frame 26073 print replay.events[-1] 27.09 Wraithan PlayerLeaveEvent

print replay.frames 25561

Is the parser mis-parsing? Is there a second frame timestamp somewhere?

If this is not a mis-parse, then we may be required to do some hackery to detect the "true" game length and not rely on replay.frames any more.

dsjoerg commented 11 years ago

This replay was release_string '2.0.0.23925'

So maybe it was a bug that has been fixed in later releases. I'll survey the replays and see which releases this has been observed to happen in.

dsjoerg commented 11 years ago

Oh wow. This problem happens with 100% of the 2.0.0.23925 replays.

And with 0% of the 2.0.0.24247 and 2.0.3.24764 replays. We have ~460 replays from 2.0.0.24247, so I'm confident the issue was resolved in that build. We only have 6 replays from 2.0.3.24764, but I think it's quite likely the bug stayed fixed.

Given that the bug has been fixed, I dont think it's terribly important to do anything about this, at least not for ggtracker. Closing, feel free to re-open if someone wants to do something about this.

GraylinKim commented 11 years ago

Great, thanks for investigating @dsjoerg. Its called beta for a reason. I am perfectly happy reporting bad data for beta replays that actually had bad data in them.