Vinifera-Developers / Vinifera

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

[Vanilla Bug] Fix Fog of War related crashes #41

Open Rampastring opened 3 years ago

Rampastring commented 3 years ago

Description:

Fog of War has some blitter crashes that overflow a buffer and cause the game to crash. It seems to be related to drawing buildings that are covered under fog. IIRC this is partially fixed in the modern CnCNet renderers (ts-ddraw and cnc-ddraw) by allocating larger buffers and it is also partially fixed in CnCNet-supported distributions by skipping exceptions, and combined these techniques seem to solve the Fog of War crashes completely on some systems. But to be safe it'd be better to still have a proper fix for the crashes in the blitters themselves.

Additional Files:

CnCNet exception skipping code: https://github.com/CnCNet/ts-patches/blob/master/src/exception_catch.c

Bittah Commander once created a good testmap for this.

Bittah commented 3 years ago

fowtest.zip This includes a version of the map for vanilla TS and another that can be used with the TS Client. For Vanilla TS you need to play as GDI and pick Gold to make this work and for the TS Client you need to pick Spawn1.

Note: Since the TS Client has no Fog of War option, you need to enable it there by opening \Resources\GameOptions.ini and then changing FogOfWar= from No to Yes under [ForcedSpawnIniOptions].

CCHyper commented 2 years ago

Attached are a set of exception logs related to this crash;

FoW_Exceptions_1.zip - Crash reproduced with vanilla Tiberian Sun. FoW_Exceptions_2.zip - Reproduced using ddraw-compat. FoW_Exceptions_3.zip - Relevant building graphics saved without RLE compression.

Thanks to @Bittah for providing these.