Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 02-24-2022 , 19:50   [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #1

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

Last edited by dustinandband; 02-25-2022 at 02:56. Reason: Edit 2
dustinandband is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-25-2022 , 08:48   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #2

See post #11.

Last edited by cravenge; 03-13-2022 at 12:13.
cravenge is offline
dustinandband
Senior Member
Join Date: May 2015
Old 02-25-2022 , 13:00   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #3

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
dustinandband is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-25-2022 , 16:28   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #4

Quote:
Originally Posted by dustinandband View Post
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.
cravenge is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-25-2022 , 17:11   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #5

Quote:
Originally Posted by cravenge View Post
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.
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-25-2022 , 20:17   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #6

Quote:
Originally Posted by BHaType View Post
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.
cravenge is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-25-2022 , 23:04   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #7

Quote:
Originally Posted by cravenge View Post
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

__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-06-2022 , 03:53   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #8

CNavArea::IsOverlapping & CNavArea::Contains Fix (L4D2 Linux only).

Require MemoryEx Fork to compile.
Attached Files
File Type: zip ChargerReturnToNavMeshUpdate-Fix.zip (50.0 KB, 111 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
dustinandband
Senior Member
Join Date: May 2015
Old 03-06-2022 , 22:51   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #9

@ 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.
dustinandband is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-07-2022 , 03:19   Re: [L4D2] Crash on CNavArea::Contains(Vector const&) const + 0x13
Reply With Quote #10

It is written long time ago and it works.
It's mid-function detour checking variable for zero.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 03-07-2022 at 03:36.
Dragokas is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:06.


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