CnCNet / yrpp-spawner

CnCNet DLL for Command and Conquer: Yuri's Revenge using Syringe
GNU General Public License v3.0
22 stars 15 forks source link

Couldn't load in Steam edition game and Syringe 0.7.3.0 yr. #22

Closed qyl27 closed 7 months ago

qyl27 commented 7 months ago

RA2 has a Steam edition, and Syringe released 0.7.3.0 yr to fix a crash.
The spawner can't load in that environment.

Logs:

[22:31:25] Syringe 0.7.3.0 yr
[22:31:25] ==================

[22:31:25] WinMain: arguments = ""gamemd.exe" -win -SPAWN"
[22:31:25] WinMain: Trying to load executable file "gamemd.exe"...

[22:31:25] SyringeDebugger::RetrieveInfo: Retrieving info from the executable file...
[22:31:25] SyringeDebugger::RetrieveInfo: Executable information successfully retrieved.
[22:31:25]  exe = gamemd.exe
[22:31:25]  pImLoadLibrary = 0x007E1220
[22:31:25]  pImGetProcAddress = 0x007E1250
[22:31:25]  pcEntryPoint = 0x007CD80F
[22:31:25]  dwExeSize = 0x0050A940
[22:31:25]  dwExeCRC = 0xA3F19485
[22:31:25]  dwTimestamp = 0x3BDF544E

[22:31:25] WinMain: SyringeDebugger::FindDLLs();

[22:31:25] SyringeDebugger::FindDLLs: Recognized DLL: "Ares.dll"
[22:31:25] SyringeDebugger::Handshake: Calling "Ares.dll" ...
[22:31:25] SyringeDebugger::Handshake: Answers "Found Yuri's Revenge 1.001 (Steam). Applying Ares 3.0p1." (0)
[22:31:25] SyringeDebugger::FindDLLs: Shim recognized DLL: "cncnet5.dll"
[22:31:25] SyringeDebugger::FindDLLs: Done (1461 hooks added).

[22:31:25] WinMain: SyringeDebugger::Run("-win -SPAWN");

[22:31:25] SyringeDebugger::Run: Running process to debug. cmd = "gamemd.exe -win -SPAWN"
[22:31:25] SyringeDebugger::Run: Allocating 0x580 bytes...
[22:31:25] SyringeDebugger::Run: pAlloc = 0x001C0000
[22:31:25] SyringeDebugger::Run: Writing DLL loader & caller code...
[22:31:25] SyringeDebugger::Run: pcLoadLibrary = 0x001C0000
[22:31:25] SyringeDebugger::Run: Entering debug loop...
[22:31:26] SyringeDebugger::HandleException: Finished retrieving proc addresses.
[22:31:26] SyringeDebugger::HandleException: Creating code hooks.
[22:31:31] SyringeDebugger::Run: Done with exit code 0 (0).

[22:31:31] WinMain: SyringeDebugger::Run finished.
[22:31:31] WinMain: Exiting on success.
Belonit commented 7 months ago

The new Syringe 0.7.3.0 yr has special logic for the dll named cncnet5.dll. As a workaround, you can simply rename cncnet5.dll to CnCNet-Spawner.dll

qyl27 commented 7 months ago

I tried to do that but got a fatal error now.

Expect.txt:

Internal Error encountered!
---------------------
Ares version: 21.352.1218
---------------------
Exception code: C0000005 at 74E20440
Registers:
EIP: 74E20440   ESP: 0019D0A8   EBP: 00000004
EAX: 00000061   EBX: 00000001   ECX: FFFFFFFF
EDX: 09370208   ESI: 189801B0   EDI: 00000000

Stack dump:
0019D0A8: 06C1000D
0019D0AC: 0019D0B0
0019D0B0: 006847B7
0019D0B4: 00000202
0019D0B8: 00000000
0019D0BC: 189801B0
0019D0C0: 00000004
0019D0C4: 0019D0D8
0019D0C8: 00000001
0019D0CC: 09370208
0019D0D0: 161A0560
0019D0D4: 00000061
0019D0D8: 00000001
0019D0DC: 18969830
0019D0E0: 0019D320
0019D0E4: 00000000
0019D0E8: 189801B0
0019D0EC: FFFFFFFE
0019D0F0: 0019D180
0019D0F4: 7790D092
0019D0F8: 00000004
0019D0FC: 00000010
0019D100: 02ED02AC
0019D104: 0019D150
0019D108: 18A28570
0019D10C: 02ED0000
0019D110: 02ED13A4
0019D114: 18A286A8
0019D118: 77617073
0019D11C: 70616D6E
0019D120: 696E692E
0019D124: 00000000
0019D128: 00000020
0019D12C: 0001000F
0019D130: 18A28530
0019D134: 18A28660
0019D138: 7790D041
0019D13C: 18A28660
0019D140: 00000000
0019D144: 00000010
0019D148: 7537F88C
0019D14C: 02ED0000
0019D150: 02ED13A0
0019D154: 00000010
0019D158: 18C901C4
0019D15C: 00000000
0019D160: 00000002
0019D164: 18C90000
0019D168: 00000018
0019D16C: 18C907D0
0019D170: 18C90000
0019D174: 18C90AD4
0019D178: 00000000
0019D17C: 18A28570
0019D180: 18A28748
0019D184: 00000000
0019D188: 00000000
0019D18C: 20746670
0019D190: 00000002
0019D194: 00000018
0019D198: 18C901C4
0019D19C: 00000000
0019D1A0: 00000003
0019D1A4: 18C90000
0019D1A8: 00000010
0019D1AC: 00000008
0019D1B0: 02ED0000
0019D1B4: 00000000
0019D1B8: 753D7AC0
0019D1BC: 00000000
0019D1C0: 753D7AC0
0019D1C4: 0019D1D8
0019D1C8: 75390664
0019D1CC: 753D7AC0
0019D1D0: 753754AC
0019D1D4: 7FFFFFFE
0019D1D8: 0019D1EC
0019D1DC: 753904CD
0019D1E0: 753754AC
0019D1E4: 7537F88C
0019D1E8: 753D7AC0
0019D1EC: 00000000
0019D1F0: 753D7AC0
0019D1F4: 0019D208
0019D1F8: 75390664
0019D1FC: 753D7AC0
0019D200: 753754AC
0019D204: 7FFFFFFE
0019D208: 0019D21C
0019D20C: 753904CD
0019D210: 753754AC
0019D214: 00000000
0019D218: 753D7AC0
0019D21C: 0019D230
0019D220: 75390664
0019D224: 753D7AC0
0019D228: 753754AC
0019D22C: 7FFEC000
0019D230: 0000AA64
0019D234: 779215D2
0019D238: 0019D290
0019D23C: 0019D294
0019D240: 75390664
0019D244: FFFFFFFF
0019D248: 753754AC
0019D24C: 7FFFFFFE
0019D250: 0019D264
0019D254: 753904CD
0019D258: 753754AC
0019D25C: 02ED98F0
0019D260: 753D7AC0
0019D264: 77936A1C
0019D268: AFB67FA8
0019D26C: 0019D2E4
0019D270: 779212C0
0019D274: FFFFFFFF
0019D278: 0019D294
0019D27C: 779213DA
0019D280: 161D96FC
0019D284: 161D96C0
0019D288: 161D971C
0019D28C: 77936F1C
0019D290: 77928664
0019D294: 0000014C
0019D298: 31801077
0019D29C: 010EE5FD
0019D2A0: 010435C4
0019D2A4: 0000078E
0019D2A8: 00000000
0019D2AC: 00000000
0019D2B0: 7FFEC000
0019D2B4: 00000001
0019D2B8: FFFFFFFF
0019D2BC: F90A5A37
0019D2C0: F5E642B5
0019D2C4: 00002713
0019D2C8: 5A28DA19
0019D2CC: 00000029
0019D2D0: 161D971C
0019D2D4: 161D96C0
0019D2D8: 085B000D
0019D2DC: 0019D2E0
0019D2E0: 00720DED
0019D2E4: 00000246
0019D2E8: 00000002
0019D2EC: 00A83D10
0019D2F0: 0306A584
0019D2F4: 0019D308
0019D2F8: 00000001
0019D2FC: 00000002
0019D300: 161D74A0
0019D304: 00844808
0019D308: 008447EC
0019D30C: 00000002
0019D310: 00844808
0019D314: 00000001
0019D318: 18969830
0019D31C: 00000000
0019D320: 0306A584
0019D324: 00683D26
0019D328: 0306AACC
0019D32C: 18980320
0019D330: 0019D448
0019D334: 00A8B238
0019D338: 00A7932B
0019D33C: 007E4C30
0019D340: F27B739E
0019D344: 007EA5F4
0019D348: 00000000
0019D34C: 00000000
0019D350: 007E1B04
0019D354: 007E1B0C
0019D358: 0019D360
0019D35C: 00000000
0019D360: 007E1B0C
0019D364: 00000000
0019D368: 0019D354
0019D36C: 00000000
0019D370: 00000000
0019D374: 00000000
0019D378: 62972C00
0019D37C: 00000000
0019D380: 00000000
0019D384: 0DAB2400
0019D388: D621042F
0019D38C: 82D1673B
0019D390: 1E5F4D66
0019D394: 62B74920
0019D398: 14DBC77D
0019D39C: 007F08BC
0019D3A0: 79E8D700
0019D3A4: 00000001
0019D3A8: 00000000
0019D3AC: FFFFFFFF
0019D3B0: FFFFFFFF
0019D3B4: 00000000
0019D3B8: 00000000
0019D3BC: 68D67B00
0019D3C0: 00000000
0019D3C4: 7D780000
0019D3C8: 00000000
0019D3CC: 00000000
0019D3D0: 00000000
0019D3D4: 00000000
0019D3D8: 00000000
0019D3DC: FFFFFFFF
0019D3E0: FFFFFFFF
0019D3E4: 00000000
0019D3E8: 00000000
0019D3EC: 00000000
0019D3F0: 235B9E00
0019D3F4: 00000000
0019D3F8: 00000000
0019D3FC: F252B600
0019D400: 00000000
0019D404: 00000002
0019D408: 0D3E0259
0019D40C: 1B10B04A
0019D410: 4FD843FB
0019D414: 30F7FDC2
0019D418: 0306A584
0019D41C: D3D90300
0019D420: 0019D448
0019D424: 746191DB
0019D428: FFFFFFFF
0019D42C: 0000000E
0019D430: 161A0598
0019D434: 0306A584
0019D438: 00000008
0019D43C: 091C0001
0019D440: 00000007
0019D444: 0000000A
0019D448: 0019D470
0019D44C: 74618D01
0019D450: 0306A584
0019D454: 00000001
0019D458: 091C10B0
0019D45C: 00000000
0019D460: 0048CDA8
0019D464: 16214E40
0019D468: 0081D53C
0019D46C: 0306A584
0019D470: 0019F0A8
0019D474: 0048CDD8
0019D478: 091C10B0
0019D47C: 00000000
0019D480: 00000000
0019D484: 00000000
0019D488: 00000000
0019D48C: 00000000
0019D490: 00000000
0019D494: 00000000
0019D498: 00000000
0019D49C: 00000000
0019D4A0: 00000000
0019D4A4: 00000000
Belonit commented 7 months ago

I tried to do that but got a fatal error now.

Expect.txt:

@qyl27 Please tell us more about your mod, please also attach debug.log, spawn.ini and spawnmap.ini

qyl27 commented 7 months ago

Yes, I am trying to create a self-host-able online battle platform with my friends, I have created a spawn.ini according to the document in the docs branch.
spawn.ini: Pastebin
xbayopigs.map: Pastebin I use it as sapwnmap.ini if I wasn't misunderstood.
I haven't seen a file named debug.log.

Belonit commented 7 months ago

Yes, I am trying to create a self-host-able online battle platform with my friends, I have created a spawn.ini according to the document in the docs branch. spawn.ini: Pastebin xbayopigs.map: Pastebin I use it as sapwnmap.ini if I wasn't misunderstood. I haven't seen a file named debug.log.

@qyl27 As you may have noticed, the documentation is not complete. To fix this problem, you should add [Settings]->Side=1 (or any other non-negative country index) to spawn.ini.

I should also change the default value for this flag

qyl27 commented 7 months ago

Ah, thank you!
I tried to change Country to Side because Spawner.Config.cpp#L173.
It launches, but has a dialog showing "无法读取剧情场景". (Sorry, I don't know what is the string in English. It means like couldn't read the scene.)

qyl27 commented 7 months ago

After reading the source of DTAClient, I know what mistake I had now.
Thanks a lot.