kaimallea / demoinfogo-linux

Linux, OSX port of Valve's demoinfogo tool
BSD 2-Clause "Simplified" License
153 stars 38 forks source link

Exit code 1 for several replays that seem to work. #21

Closed mehdi-kaytoue closed 9 years ago

mehdi-kaytoue commented 9 years ago

Thanks for this nice parser!

I got around 1500 replays from gosugamers and I am checking if they are parsable. For that I just do a ./demoingogo $filename || echo "problem" I have an exit code of 1 for a lot a replays, but when I look the output, it seems that the parsing is done correctly, See e.g. "2779_R1_logiX eSp_TCM-Gamin.dem" on gosugamers.

Any idea? Is this a problem?

Btw, I d like to know if this projet is still maintained, as I might use it quite a lot.

Thanks a lot!! Cheers

kaimallea commented 9 years ago

Hi! Thanks for reporting this. I try to keep this up-to-date with changes that Valve makes to demoinfogo, so there aren't a lot of updates. Having said that, I will attempt to fix bugs if I can. I'll take a look at this.

taylorfinnell commented 9 years ago

It could perhaps be #20. I can't find the demo file you referenced, can you link it and I will see if it's the same issue :)

mehdi-kaytoue commented 9 years ago

Hey! Thanks guys. Thats was the example of replay for which I had a 1 exit code: http://www.gosugamers.net/demos/5783-logix-esports-cs-vs-tcm-gaming/download

Btw i realized it's worth mentioning I am using macosx

Cheers

kaimallea commented 9 years ago

Apparently 1 is always returned by main(): https://github.com/csgo-data/demoinfogo-linux/blob/master/src/demoinfogo.cpp#L135

I wonder if that's a Windows thing? It's in Valve's original source, too. Fixing now.

taylorfinnell commented 9 years ago

This bug is not fixed. If you run his demo through with the -deathcsv flag you get nonsense output. The issue is that player_info_t is a different size struct in older versions of these demos. The code needs to take the version of the player_info_t into account before parsing that data.

EDIT: Yea, it will fully parse the demo without crashing, but all player info will be incorrect. I will post the correct player_info_t with proper byte padding sometime this weekend. A PR could be created to handle parsing player_info_t based on the verison.

kaimallea commented 9 years ago

@taylorfinnell sounds like a new, separate bug to me. :smiley: Do you know how the struct has changed over time?

taylorfinnell commented 9 years ago

Yep, I will open a new issue a bit later tonight with the updated info

kaimallea commented 9 years ago

Excellent, thanks again. :-)