shqke / teamcollision

Improves collision rules between members of different teams in L4D2
https://www.youtube.com/watch?v=2dNU9wJgEhA
GNU General Public License v3.0
1 stars 1 forks source link

Server crashes #1

Closed cravenge closed 3 years ago

cravenge commented 3 years ago

Same as impactfix, random crashes occur. SourceMod 1.10 and here's the crash log from Accelerator:

0 server.dll + 0x4ede51 1 server.dll + 0x28b9c 2 server.dll + 0x79252 3 teamcollision.ext.2.l4d2.dll + 0x2576 4 0x1a125b9e 5 bintools.ext.dll!CallWrapper::Execute(void ,void ) [CallWrapper.cpp:144 + 0xb] 6 teamcollision.ext.2.l4d2.dll + 0x13fe 7 teamcollision.ext.2.l4d2.dll + 0x26f2 8 server.dll + 0xf5ac2 9 server.dll + 0x2cbacf 10 server.dll + 0xfb077 11 server.dll + 0x2cefb4 12 server.dll + 0xf44fc 13 server.dll + 0x2358c6 14 server.dll + 0x2cd9ab 15 server.dll + 0x17e8bc 16 server.dll + 0x16dc65 17 server.dll + 0x23f264 18 server.dll + 0x30e92a 19 sdktools.ext.2.l4d2.dll!SourceHook_MFHCls_PlayerRunCmdHook::Func(CUserCmd ,IMoveHelper ) [hooks.cpp:50 + 0xab] 20 server.dll + 0x177697 21 server.dll + 0x17cf8a 22 server.dll + 0x144254 23 server.dll + 0xeddeb 24 sourcemod.2.l4d2.dll!SourceHook_FHCls_IServerGameDLLGameFramefalse::Func(bool) [sourcemod.cpp:54 + 0xa3] 25 engine.dll + 0x124577 26 engine.dll + 0x1256b7 27 engine.dll + 0x18f398 28 engine.dll + 0x190c06 29 engine.dll + 0x191363 30 engine.dll + 0x1a0a2b 31 engine.dll + 0x1a0b7f 32 engine.dll + 0x1a0c24 33 engine.dll + 0x200cf4 34 engine.dll + 0x1fe311 35 dedicated.dll + 0x31ce 36 dedicated.dll + 0x3906 37 dedicated.dll + 0x27dae 38 dedicated.dll + 0x4976 39 srcds.exe + 0x11fd 40 srcds.exe + 0x1929 41 kernel32.dll!BaseThreadInitThunk + 0x19 42 ntdll.dll!__RtlUserThreadStart + 0x2f 43 ntdll.dll!_RtlUserThreadStart + 0x1b

shqke commented 3 years ago

shqke/impactfix#2

Thanks for the report!

cravenge commented 3 years ago

They are no longer random but on a specific scenario this time and it's when human players and/or bots respawn in rescue closets. Here's the crash log:

0 0x87dd00 1 teamcollision.ext.2.l4d2.dll + 0x23a0 2 server.dll + 0x20b94e 3 engine.dll + 0x179d46 4 server.dll + 0x1aced3 5 server.dll + 0x1ad152 6 server.dll + 0x1acae7 7 vstdlib.dll + 0x883a 8 vstdlib.dll + 0xad9d 9 tier0.dll + 0xdb0d 10 tier0.dll + 0x1faa8 11 tier0.dll + 0x1fb32 12 kernel32.dll!BaseThreadInitThunk + 0x19 13 ntdll.dll!__RtlUserThreadStart + 0x2f 14 ntdll.dll!_RtlUserThreadStart + 0x1b

shqke commented 3 years ago

Found concurrency issue with CBaseEntity::ShouldCollide and sourcehook apparently not being thread safe, and replaced hooking method with detours. Now there is a very small chance to crash on unloading/loading this extension in the middle of the game, so should be safe.

Let me know if you still have crashes. 😀

cravenge commented 3 years ago

The newest version doesn't seem to be problematic now so I can say that it's all working fine. Cheers! 😀

shqke commented 3 years ago

Glad it's resolved, was a tricky one to find. 😀

cravenge commented 3 years ago

I never expected it to happen again but ever since I hard restarted my server, it started to act up with the new offset I proposed. Only this time, I can't provide any Accelerator logs since they get stuck at processing indefinitely.

shqke commented 3 years ago

Reverted #2 with #3. Try now.

cravenge commented 3 years ago

I still don't get why it wouldn't work even though the offset should have been correct.

shqke commented 3 years ago

I only saw CGameMovement::GetPlayerMins( void ) and CGameMovement::GetPlayerMaxs( void ) between CGameMovement::SetupMovementBounds( CMoveData *pMove ) and CGameMovement::GetMinGroundNormalZ( void ) in Windows binary.

In Linux binary both are past CTerrorGameMovement::PlayerSolidMask(bool brushOnly, CBasePlayer *testPlayer), so likely optimized by a compiler.

Extension should now function properly, you can compare result with a video.