Vinifera-Developers / Vinifera

Vinifera is a C&C: Tiberian Sun engine extension implementing new logics and fixing bugs.
GNU General Public License v3.0
44 stars 10 forks source link

[Vanilla Bug] Fix obscure minimap crash / infantry entering harvesters when they intersect at tunnel entrances #84

Open Rampastring opened 3 years ago

Rampastring commented 3 years ago

Description:

Maps with complex layouts involving lots of tunnels crash regularly. After a ton of investigative work on the issue, AlexB concluded that there's a bug in the game that sometimes causes infantry to enter harvesters. When this happens, the infantry are removed from the map, and with it, unlinked from the game's radar system. At some later point in time, this infantry might somehow get added back on to the map, but when it's destroyed, the infantry is not unlinked from the radar system anymore.

I assume this leads the radar system into tracking an object whose memory is freed, resulting in it basically tracking a bad object pointer, which then leads to a crash at a later time.

Example of a map that heavily suffered from crashes due to this bug prior to it getting fixed: https://media.moddb.com/images/mods/1/11/10865/Tiberium_Rig.png

Additional Files:

This is fixed in CnCNet ts-patches by AlexB: https://github.com/CnCNet/ts-patches/blob/master/src/minimap_crash.asm

I don't know anything further about this issue, maybe AlexB could still have some details.

CCHyper commented 3 years ago

As mentioned in the patch comment, this only fixes the effect. I would like there to be more research on this item as to what is allowing the infantry to "enter" the Harvester (or any other UnitType?) before a decision is made.

Could this perhaps be an edge case in which the game is assuming the infantry is a vehicle hijacker?

CCHyper commented 3 years ago

Test map by @Bittah for possibly reproducing this crash; tiberium_rig.zip