AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13 (https://forums.alliedmods.net/showthread.php?t=336509)

dustinandband 02-24-2022 19:50

[L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
There appears to be an issue with charger navigation pathing that leads to crashes on my servers (about 3-6 crashes per week). It's worth mentioning too that I don't have any plugins installed that would alter navmesh / SI pathing / charger (or any SI) behavior.

Relevant info

(all survival mode) :
https://crash.limetech.org/hhovm63ybiry
https://crash.limetech.org/ajmpffpb754n
https://crash.limetech.org/gzy2vtfnmnu5
https://crash.limetech.org/ui4jmkfz4cce
https://crash.limetech.org/3zm2hkep4adb
https://crash.limetech.org/k6zy3h3ajnil

Code:

0        server_srv.so!CNavArea::Contains(Vector const&) const + 0x13
1        server_srv.so!ChargerReturnToNavMesh::Update(Charger*, float) + 0x3b
2        server_srv.so!Action<Charger>::InvokeUpdate(Charger*, Behavior<Charger>*, float) + 0xed
3        server_srv.so!Action<Charger>::InvokeUpdate(Charger*, Behavior<Charger>*, float) + 0x12a
4        server_srv.so!Behavior<Charger>::Update(Charger*, float) + 0x55
5        server_srv.so!ChargerIntention::Update() + 0xd4
6        server_srv.so!INextBot::Update() + 0x84
7        server_srv.so!BossZombiePlayerBot::Update() + 0x41
8        server_srv.so!NextBotPlayer<CTerrorPlayer>::PhysicsSimulate() + 0x24b
9        server_srv.so!BossZombiePlayerBot::PhysicsSimulate() + 0x123

might help:
Quote:

ProdigySim —
might be a valve bug. It looks like the crash is a null pointer read inside CNavArea::Contains on the this pointer
https://i.imgur.com/q4gm2vM.png
Based on this information, it would be that the charger itself ends up off of a valid nav area, and then when it tries to check things about its current nav area it crashes
Plugins:
Spoiler


Edit

Was able to salvage the SourceTV demo file, surprisingly still playable when interrupted by a server crash.

I'm sure it was this charger causing the issue
https://youtu.be/_9MXRh8n5KA?t=25

https://f002.backblazeb2.com/file/Go...351-976.dem.gz

Though should note here that the crash happens often and happens on a variety of different maps.

If I edit this post again it'll be with more footage of different maps, in-case the nav-mesh needs editing / patching to fix the issue.


Edit #2

Alright, was a huge pain in the ass but ended up hunting down relevant demos via accelerator. All the footage is relevant to the crash report (i.e. stuck charger = crash)

After a charger gets stuck i keep it playing at 600% speed to see how long before it crashes. Average seems to be ~ 2 mins but sometimes it's less.

Uploaded these clips in-case it's possible for drem + kerry to officially update the game. Might have another hot-fix in the mean time.

Footage:

c1m2_streets - 5 clips
https://youtu.be/sdw042knHmw

c6m1_riverbank - 2 clips
https://youtu.be/pRLkgS0zgzw

c8m5_rooftop - 1 clip
https://youtu.be/9iLyK4WiPg0

c13m3_memorialbridge - 2 clips (2nd clip shows car area too)
https://youtu.be/PillHRhwGEc

c7m3_port - 2 clips
https://youtu.be/dYmwa20nNeA

c1m4_atrium - 5 clips
https://youtu.be/DW7T2_ytRLY

cravenge 02-25-2022 08:48

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
See post #11.

dustinandband 02-25-2022 13:00

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
There was an error about failing to find the return address of original function

Code:

L 02/25/2022 - 17:54:40: SourceMod error session started
L 02/25/2022 - 17:54:40: Info (map "c1m4_atrium") (file "/root/L4D2/left4dead2/addons/sourcemod/logs/errors_20220225.log")
L 02/25/2022 - 17:54:40: [DHOOKS] FATAL: Failed to find return address of original function. Check the arguments and return type of your detour setup.
L 02/25/2022 - 17:54:53: SourceMod error session started
L 02/25/2022 - 17:54:53: Info (map "c1m4_atrium") (file "/root/L4D2/left4dead2/addons/sourcemod/logs/errors_20220225.log")
L 02/25/2022 - 17:54:53: [CRASH] Accelerator uploaded crash dump: Crash ID: OICP-SSR7-SMBA

Code:

0        0x0
1        server_srv.so!Action<Charger>::InvokeUpdate(Charger*, Behavior<Charger>*, float) + 0x12a
2        server_srv.so!Behavior<Charger>::Update(Charger*, float) + 0x55
3        server_srv.so!ChargerIntention::Update() + 0xd4
4        server_srv.so!INextBot::Update() + 0x84
5        server_srv.so!BossZombiePlayerBot::Update() + 0x41
6        server_srv.so!NextBotPlayer<CTerrorPlayer>::PhysicsSimulate() + 0x24b
7        server_srv.so!BossZombiePlayerBot::PhysicsSimulate() + 0x123
8        server_srv.so!Physics_SimulateEntity(CBaseEntity*) + 0x152
9        server_srv.so!Physics_RunThinkFunctions(bool) + 0x2d1


cravenge 02-25-2022 16:28

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
Quote:

Originally Posted by dustinandband (Post 2772440)
There was an error about failing to find the return address of original function

Code:

L 02/25/2022 - 17:54:40: SourceMod error session started
L 02/25/2022 - 17:54:40: Info (map "c1m4_atrium") (file "/root/L4D2/left4dead2/addons/sourcemod/logs/errors_20220225.log")
L 02/25/2022 - 17:54:40: [DHOOKS] FATAL: Failed to find return address of original function. Check the arguments and return type of your detour setup.
L 02/25/2022 - 17:54:53: SourceMod error session started
L 02/25/2022 - 17:54:53: Info (map "c1m4_atrium") (file "/root/L4D2/left4dead2/addons/sourcemod/logs/errors_20220225.log")
L 02/25/2022 - 17:54:53: [CRASH] Accelerator uploaded crash dump: Crash ID: OICP-SSR7-SMBA

Code:

0        0x0
1        server_srv.so!Action<Charger>::InvokeUpdate(Charger*, Behavior<Charger>*, float) + 0x12a
2        server_srv.so!Behavior<Charger>::Update(Charger*, float) + 0x55
3        server_srv.so!ChargerIntention::Update() + 0xd4
4        server_srv.so!INextBot::Update() + 0x84
5        server_srv.so!BossZombiePlayerBot::Update() + 0x41
6        server_srv.so!NextBotPlayer<CTerrorPlayer>::PhysicsSimulate() + 0x24b
7        server_srv.so!BossZombiePlayerBot::PhysicsSimulate() + 0x123
8        server_srv.so!Physics_SimulateEntity(CBaseEntity*) + 0x152
9        server_srv.so!Physics_RunThinkFunctions(bool) + 0x2d1


Odd.

BHaType 02-25-2022 17:11

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
Quote:

Originally Posted by cravenge (Post 2772447)
Odd.

You can't detour action event handlers especially on linux. Those functions return struct which on linux is highly optimized. That's why i created extension.

cravenge 02-25-2022 20:17

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
Quote:

Originally Posted by BHaType (Post 2772448)
You can't detour action event handlers especially on linux. Those functions return struct which on linux is highly optimized. That's why i created extension.

I'm still wrapping my head around your extension since it's a little bit confusing for me to be honest even with examples given.

BHaType 02-25-2022 23:04

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
Quote:

Originally Posted by cravenge (Post 2772462)
I'm still wrapping my head around your extension since it's a little bit confusing for me to be honest even with examples given.

Off-top

About crash mentioned in topic you can just block it and kill charger but it's not the best idea to block action since probably some plugin breaks something that causes this crash so crash will happen again with some other action.

PHP Code:

#include <actions>

public void OnActionCreatedBehaviorAction actionint actor, const char[] name )
{
    if ( 
strcmp(name"ChargerReturnToNavMesh") == )
        
action.OnStart OnStart;
}

public 
Action OnStartBehaviorAction actionBehaviorAction priorActionActionResult result )
{
    
ForcePlayerSuicide(action.Actor);
    
result.type DONE;
    return 
Plugin_Handled// Plugin_Handled will block calling original function



Dragokas 03-06-2022 03:53

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
1 Attachment(s)
CNavArea::IsOverlapping & CNavArea::Contains Fix (L4D2 Linux only).

Require MemoryEx Fork to compile.

dustinandband 03-06-2022 22:51

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
@ Dragokas thanks appreciate that

Forgot to mention that I have the issue fixed on my servers, shqke wrote an extension that patches the issue. He didn't want to release it publicly since (his words: ) it's an ugly concept of a workaround.

If anyone else has the issue they can try out Dragokas's plugin. Might be useful to update this thread and confirm it works

Eventually will send this bug report to the TLS team for a proper fix from valve.

Dragokas 03-07-2022 03:19

Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
 
It is written long time ago and it works.
It's mid-function detour checking variable for zero.


All times are GMT -4. The time now is 17:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.