electronicarts/CnC_Remastered_Collection

new mod no changes crashes

Closed this issue · 9 comments

Hi all,
Since the latest update i can't run any personal mod in the game.
I copied the source from this site and extracted the zip to a folder.
opened the .sln using Visual Studio 2019
defined: WINDOWS_IGNORE_PACKING_MISMATCH
made no changes in the .cpp files, etc., just to check if this still works
Build the 32bit release RedAlert.dll (no errors)
copied the dll to Documents\CnCRemastered\Mods\Red_Alert<modname>\Data (overwrite one of my previous mods)
but when i start the game with the mod activated, is crashes on starting the actual skirmish game.

This method worked fine with my previous mods created before the last update.
Anyone knows what's changed so i can create a mod with the newest remastered version?
Perhaps i need to do a few additional steps to make it work now?

Hope someone can give me a hint in the right direction.

Greetings to all.

Issues appears to be something to do with how the functions in keybuff.asm are called or linked by the latest MSVC 2019 build as when replaced with C++ implementation of that ASM it runs fine from my testing.

ok, but what setting do i have to change in MSVC 2019?

I don't know, I haven't worked out what causes it yet.

i removed Visual Studio 2019 and installed 2017. Now it works.

For those interested in building with 2019, the https://github.com/Vanilla-Conquer/Vanilla-Conquer/ fork supports it by replacing the problematic asm code with C++ alternatives.

@OmniBlade did you include the latest patch update? cause I was able to compile and run mods before without crashing before the September Patch.
They must have added something that breaks it in MSVC 2019.

Did you update MSVC 2019? Its an update to that which has broken it as far as I can tell, the crash is in an asm function but I've not been able to figure out if the issue is the assembler or the code gen around calls to the assembly function. There were crashes with 2019 before the Sept patches.

Yeah i had to rebuild my windows install so I reinstalled the latest MSVC 2019. before that I was using whatever was available in June. hmm.. ok so it must be related to update to VS.
Well for now I just switched back to 2017.
I wonder if the release notes can tell us anything.
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes

i switched back to VS 2017 and the problem is gone. Must be a bug in VS 2019.