encratite / RiotControl

An elaborate statistics tracking system for League of Legends. It used to be a centralised PostgreSQL based system but now it's a stand-alone SQLite application. It was written in C# and makes use of the LibOfLegends RTMP library. It is licensed under the terms of the GPLv3. Unfortunately I stopped working on it in 2013-08. Check out the website for a longer explanation.
http://riot.cont.ro.lt/
GNU General Public License v3.0
33 stars 15 forks source link

Wrong win/loss data #29

Closed encratite closed 12 years ago

encratite commented 12 years ago

JafffaCake on Reddit reported that he is seeing invalid win/loss data in the match histories. This is one of the most alarming reports so far. This actually used to be an issue shortly after I stopped storing information on whether a player had won a game in the "player" table itself, as this is somewhat redundant/not elegant and stored it in the "game" team in the "blue_team_won" integer instead. In the beginning I had specified some wrong boolean terms that would set this flag incorrectly but I haven't seen this bug since then.

I am currently waiting for a reply on Reddit. I want to know the names of the summoners for which this occurred so I can check if I can reproduce this bug.

Alright, so I confirmed my version producing incorrect results for "Pronger of BDF" - I am not sure why, though. I added some debugging output and ran it again and then it started producing the correct results. I even reverted to the original code and it still produced the correct results. I have no idea why. This is very alarming.

Ah, now I get it. To reproduce this, you need to look up "Jafffacake" and then "Pronger of BDF" on a blank database. This must be a bug in UpdateSummonerGame that only occurs in the "//The game is already in the database" case.

encratite commented 12 years ago

Fixed in https://github.com/epicvrvs/RiotControl/commit/5e2242462f4006e8f429a2155c72299525161437