Closed KynikossDragonn closed 3 years ago
I needs more info, like OS and used binary.
Seems linux/unix, and I think find right place in code and will try to analyze what's can going wrong.
I needs more info, like OS and used binary.
Oh, sorry. I'm using Void Linux with kernel package 5.8.12_2.
I built from cloning the master at around September 21, 2020.
Crash conditions are:
On your unit die all missiles reattached to your host-station as emitter because no more units in this squad for taking commander role. Then enemy unit hitted by missile and change agro to flee - it goes to iterate all attackers of this unit Alive missiles are in this list and at this point it switches to parent of missile emitter ( emitter switched to host-station after our unit die).
And for host-station and other top-level units in unit-tree (or dead cache unit list) originally parent setted to hacky value "(type)1" instead of real pointer or NULL. And this "1" used as object in this situation and all goes segfault.
Original game not crash because it's use two! pointers to parent. One to parent object and one to internal structure of that object which represent base unit object. When units directly placed in dead cache list or global units list this second pointer is NULL. And in situation like above used this NULL pointer and it's correctly processed after.
This bug must be fixed by this two commits: https://github.com/Marisa-Chan/UA_source/commit/0732921361e717aa723a1190eb61270e9f56709e https://github.com/Marisa-Chan/UA_source/commit/9432ecd74d94161e221abf21b931ffeec73994d5
OH NO! The DEATH CACHE BUG is back!\n
I've hadn't had this happen since that last commit that fixed the host station destruction segfault, so I think this case can be closed now.
This happened during a livestream, I've clipped what happened: https://www.twitch.tv/videos/758279357
I think the crash might involve your unit getting destroyed the moment it hits or destroys another unit at nearly the same time, race condition perhaps?