Raised This Month: $12 Target: $400
 3% 

Solved [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b [PATCHED]


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-22-2020 , 11:41   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #21

Looks like fix is working correctly

Spoiler
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 11-22-2020 at 11:41.
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-22-2020 , 13:12   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #22

Timocop, your server is suffering from the identical piece of unsafe valve source code, written in SurvivorUseObject::ShouldGiveUp, and causing null pointer dereference when it call SurvivorBot::IsReachable with NULL argument.

Spoiler


Try such one detour.
Attached Files
File Type: zip IsReachableDHook.zip (7.3 KB, 161 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 11-23-2020 , 11:16   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #23

Dragokas, thanks for the help! Ill try it out!
__________________
Timocop is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-27-2020 , 12:51   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #24

CMoveableCamera::FollowTarget fix is updated with Windows signatures.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 11-28-2020 , 06:50   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #25

Strange. This doesn't happen on Windows servers since I'm running one but I'm not sure for the other server owners out there.
cravenge is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-28-2020 , 07:47   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #26

I received one crash report directly pointed to null ptr dereference in the same instruction in Windows.
I dunno why some servers has no crash, other - rare crash, and even other - often crashes after Last stand update.

This is something related to incorrect filling the fields of CMovableCamera class instance.
In some cases (for me, ~ 6 times per day) one of the fields just have 0 value, when it should have a bit field containing some serial number (if I understand SDK source correctly ) + client id, further used to decide whether to cast client id to CBaseEntity, leading to use that CBaseEntity without any check for null. So, this crash should happen sooner or later.

I didn't try to find the root of the problem. Without the source code it's like a non-trivial task to find what function fills that field incorrectly. Maybe, we can use DHooks to set a hook on a row address and as soon as field become 0 call a crash manually to see a call stack... In my fix I just rewrote a piece of source code attaching appropriate checks, deciding whether to call the original function or block it. There is no place to just patch the code and insert check for null; that requires instruction detour inside a function, I hope Rostu can improve his Mem extended for alloc executable memory to be able do such simple patches in the future instead of re-writing the whole source code
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-29-2020 , 11:44   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #27

Quote:
Originally Posted by cravenge View Post
Strange. This doesn't happen on Windows servers since I'm running one but I'm not sure for the other server owners out there.
My windows dedicated server crashes every day


https://crash.limetech.org/777pmwca6l6t
https://crash.limetech.org/bohh7vlrfbyr
https://crash.limetech.org/xr3w7e6oha4s
https://crash.limetech.org/v73q443hd6nu
https://crash.limetech.org/deyg33fhly7m
https://crash.limetech.org/xejyw3amu654
__________________
HarryPotter is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 11-29-2020 , 19:01   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #28

This is really odd. I haven't encountered this kind of crash whenever someone goes AFK or switch from survivors to spectators team and vice versa.

I keep seeing that this is caused by MultiSlots which I don't have in my server.

Last edited by cravenge; 11-29-2020 at 19:17.
cravenge is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-29-2020 , 23:02   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #29

Quote:
Originally Posted by cravenge View Post
This is really odd. I haven't encountered this kind of crash whenever someone goes AFK or switch from survivors to spectators team and vice versa.

I keep seeing that this is caused by MultiSlots which I don't have in my server.
probably somthing wrong with L4dtoolz,
I hate this TLS update really...
Everything is perfect before
__________________

Last edited by HarryPotter; 11-29-2020 at 23:02.
HarryPotter is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 11-30-2020 , 05:25   Re: [L4d2] Crash on CMoveableCamera::FollowTarget() + 0x3b
Reply With Quote #30

I am using the 16 players slots version and everything works without any problems. Dunno about the original 32 players slots one.
cravenge 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 16:20.


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