Gameye / halflife-statistic

Statistics for halflife engine games (TF2, CS:GO)
Other
0 stars 0 forks source link

tournament mode logs the first round start twice #42

Closed Smashmint closed 6 years ago

Smashmint commented 6 years ago

It seems there is a bug when you active the "tournament mode" in TF2.

When activating this it outputs the first Round_Start event twice at the same second:

L 03/26/2018 - 13:18:47: "denise<4><[U:1:437819661]><>" entered the game L 03/26/2018 - 13:19:05: "denise<4><[U:1:437819661]><Unassigned>" joined team "Red" L 03/26/2018 - 13:19:10: "denise<4><[U:1:437819661]><Red>" changed role to "soldier" L 03/26/2018 - 13:19:20: World triggered "Round_Start" echo "Playing..." L 03/26/2018 - 13:19:20: World triggered "Round_Start" Playing...

Smashmint commented 6 years ago

@TNGPS I believe @elmerbulthuis already pointed this out to you.

elmerbulthuis commented 6 years ago

Yup! could be solved by not allowing finished rounds to be more than started rounds, or not allow two start events after eachother. Or by ignoring a start event when a round is already started.

elmerbulthuis commented 6 years ago

actually i think

Or by ignoring a start event when a round is already started.

is the nicest solution, a round should never be allowed to start when the previous one is not finished!

TNGPS commented 6 years ago

Fixed the issue as suggested by @elmerbulthuis. However it looks to me the bug is triggered by the “echo” call in the log, and thus can happen on every log line from the games.

I suggest we add a small look back buffer in the base log parser, that filters out duplicate log lines.

elmerbulthuis commented 6 years ago

The echo command is not the cause!

It's very possible that another event is written between the processing of the echo event and the actual writing. This is probably because multiple unsunchronized threads write to the same stream (stdout)