Closed Julien2313 closed 3 years ago
Thanks for reporting this @Julien2313 !
Seems like this happens in round 4 when Player Xelf begins to plant the bomb.
For some reason bombsite B is not correctly set up:
It's ID is 429, but the CBaseTrigger
/ bounding box corresponding to that ID has completely wrong boundaries.
Expected coordinates of the centre are X=-2770, Y=904, Z=-56
(which is around where Xelf was when he planted the bomb) but actual bounds according to CBaseTrigger
are these
No worries if that doesn't make any sense what I'm saying - it's mostly for myself when I look at this again in a few days. But basically: I've got no clue why this would happen ...
If you could get me another demo from that map that would be super useful to investigate further.
No no, I digged in your code I understand it! Ha ha Is their a way to avoid it to stop parsing the demo ?
I'm waiting you to do a game on it ! Ha ha Yeah, I'll search another demo somewhere to check this
I'm afraid there's no way to prevent the crash as of now.
If it's critical for you I recommend temporarily forking the project and removing that panic - and hopefully I'll be able to get this sorted out properly by the end of next week and you can switch back to the official version.
Yeah no worries, it's really not critical ;)
Here is a new demo, same issue : http://replay187.valve.net/730/003480011012659216461_0088537034.dem.bz2
this demo can reproduce this problem http://replay234.wmsj.cn/730/003480539579251949579_0470276058.dem.bz2
thanks both for the additional samples.
tomorrow it's my first open-source Friday (:tada:), so should hopefully get around to it
I've removed the panic and replaced it with a ParserWarn
event.
So after go get -u github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs@v2.7.1
you should no longer see the panic.
However, this means BombEvent.Site
may now be unknown/ undefined (meaning it's neither BombsiteA
nor BombsiteB
) - I'm not sure if this will be easily fixable
If you need bombsite information, I think a workaround for now is that you do the following in your code:
parser.RegisterEventHandler(func(planted events.BombPlanted) {
if planted.Site != events.BombsiteA && planted.Site != events.BombsiteB && parser.Header().MapName == "de_grind" {
planted.Site = events.BombsiteB
}
// handle event as usual
})
Hopefully I will be able to fix this properly at some point.
I have opened #284 to track the remaining issue of the missing bomb site information.
Thank you for your fix ! :)
Describe the bug When trying to parse this game on the new map Grind, I got an error
panic: bomb not planted on bombsite A or B
To Reproduce
Links to download demos : http://replay272.valve.net/730/003479822691228189340_1757036846.dem.bz2 (available 1 month since now) http://replay187.valve.net/730/003480011012659216461_0088537034.dem.bz2
Code:
Expected behavior Not getting an error
Additional context The bomb in the round has never been planted anywhere in the round (occuring during the 5th for the first time) :( the only time it has been moved is when a player has been killed. nobody picked up the bomb again.
In previous round, someone (ok, it was me) died with the bomb, but the parser doesn't panic. Maybe the demo is a little bite corrupted ? Idk :x But it appends 11 times during the parsing, so it's a bug corruption ? Ha ha. I guess this is "just" bad event on this map ? I can't tell you if this is happening on others demos on this map or not as I only have 1 demo on this one :(
Their is no such errors on the other new map Mocha
Thank you for your help :)