TheAssemblyArmada / Vanilla-Conquer

Vanilla Conquer provides clean, cross-platform builds of the C&C Remastered Collection and the standalone legacy games.
Other
349 stars 52 forks source link

MSVC built RedAlert.dll freezes during gameplay #160

Open TobiasKarnat opened 3 years ago

TobiasKarnat commented 3 years ago

To reproduce the freeze, RedAlert.dll needs to be build with MSVC (I used 19.27.29112 with default flags) and you need to run over a nuclear crates like in the map Siberia: Fresh Tracks.

grafik

I can't get any backtrace as it only freezes. Doesn't happen without mod and doesn't if vanilla conquer was built with mingw-w64-gcc (all run with wine).

OmniBlade commented 3 years ago

Does this only happen in the remaster build or does it also affect standalone?

TobiasKarnat commented 3 years ago

Standalone is affected as well (not always on every nuke crate). What I have got

Bildschirmfoto zu 2020-10-23 14-54-54

Wine-dbg>bt
Backtrace:
=>0 0x005ecfbd failwithmessage+0x1ed(retaddr=0x4a93bd, crttype=0x1, errnum=0, msg="The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
") [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\rtc\error.cpp:213] in vanillara (0x0031f954)
  1 0x005ecbf9 _RTC_Failure+0x28(retaddr=0x4a93bd, errnum=0) [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\rtc\error.cpp:234] in vanillara (0x0031f96c)
  2 0x005ec8df _RTC_CheckEsp+0x1e() [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\rtc\stack.cpp:43] in vanillara (0x0031f990)
  3 0x03030303 (0x0031f990)
  4 0x004a93bd DriveClass::Start_Of_Move+0xebc() [D:\1\E:\Vanilla-Conquer\redalert\drive.cpp:1261] in vanillara (0x0031f9f4)
  5 0x004a74bd DriveClass::AI+0x3ec() [D:\1\E:\Vanilla-Conquer\redalert\drive.cpp:1390] in vanillara (0x0031fa08)
  6 0x00594999 UnitClass::AI+0xc8() [D:\1\E:\Vanilla-Conquer\redalert\unit.cpp:393] in vanillara (0x0031fa1c)
  7 0x0050d193 LogicClass::AI+0x4f2() [D:\1\E:\Vanilla-Conquer\redalert\logic.cpp:350] in vanillara (0x0031fad4)
  8 0x0048b947 Main_Loop+0x2d6() [D:\1\E:\Vanilla-Conquer\redalert\conquer.cpp:2252] in vanillara (0x0031fb58)
  9 0x0048be20 Main_Game+0xff(argc=0x2, argv=0x31fe40) [D:\1\E:\Vanilla-Conquer\redalert\conquer.cpp:347] in vanillara (0x0031fbf8)
  10 0x005667e2 WinMain+0x8d1(instance=0x400000, __formal=(nil), command_line="-CD.", command_show=0x1) [D:\1\E:\Vanilla-Conquer\redalert\startup.cpp:656] in vanillara (0x0031fea4)
  11 0x005ebc0d invoke_main+0x2c() [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:102] in vanillara (0x0031fec4)
  12 0x005eba67 __scrt_common_main_seh+0x156() [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] in vanillara (0x0031ff20)
  13 0x005eb8fd __scrt_common_main+0xc() [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:330] in vanillara (0x0031ff28)
  14 0x005ebc88 WinMainCRTStartup+0x7() [D:\1\d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp:16] in vanillara (0x0031ff30)
  15 0x7b4536b1 call_process_entry+0x10() in kernel32 (0x0031ff48)
  16 0x7b453a95 start_process+0xb4() in kernel32 (0x0031ffd8)
  17 0x7b4536c2 __wine_start_process+0x9() in kernel32 (0x0031ffec)

It does crash even before sometimes, but I don't think it is related.

Backtrace:
=>0 0x005f2e49 TrailingDownVec+0x1f9() in vanillara (0x0031f978)
  1 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
  2 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
  3 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
  4 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
  5 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
  6 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
...
 200 0x005f2e49 TrailingDownVec+0x1f8() in vanillara (0x0031f978)
0x005f2e49 TrailingDownVec+0x1f9 in vanillara: movl %edx,0x0(%edi)
hifi commented 3 years ago

Is still still an issue?

TobiasKarnat commented 3 years ago

Sorry, I don't know I completely abandoned MSVC builds.

Maybe someone else wants to test this remaster bug?

Gerwin2k commented 2 months ago

This crash/freeze also happens with a MinGW32 build of standalone VanillaRA from June 2024. It also happens about 50% of the time with explosion crates in multiplayer or skirmish. Actually in this way it is a crash, on my end. I ran the VanillaRA standalone debug version through GDB. Part of the debug log is quoted below:

GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.

Thread 1 received signal SIGSEGV, Segmentation fault.
0x004bc96a in MonoClass::Clear (this=0x6641a0 <MonoArray>)
    at D:\DEV\Proj-Games\Vanilla-Conquer\redalert\monoc.cpp:424
424                 Page_Ptr()->Data[rows + SubX][cols + SubY] = cell;

Edit 1: That debug fault looks like it is something else. Also, disabling MonoClass::Clear makes no difference. Edit 2: With rules.ini I disabled explosion crates. But I still had a crash with a crate pickup anyways. Don't know what kind of crate it was, but I heard the start of the sound effect "unit...", then crash. [Powerups] Explosion=0,NONE,500

Edit 3: I suspect that other crash-prone crate is the napalm one: Napalm=0,NONE,600