Raised This Month: $ Target: $400
 0% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-28-2021 , 14:38   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #1

Quote:
Originally Posted by Peace-Maker View Post
The probem here is that both Functions sections are named the same, the arguments aren't important. All "Functions" sections in all loaded gamedata files are cached together due to a limitation in SourceMod's gamedata parser extension api. So the first plugin creates an entry in that cache with the name "CTerrorPlayer::StartReviving" and the given argument setup. When the second plugin loads its gamedata file, the "CTerrorPlayer::StartReviving" function is already present in the cache, so dhooks thinks you want to update the entry. It adds the "new" argument to the setup, since it's named differently, making the function look like it takes two arguments.

This behavior is described in the release post in the "Game specific settings" section. It allows you to change details of a hook per game, if the rest is mostly the same.
Ohhh, that makes sense! I wasn't aware that the behavior described in that section applied across multiple gamedata files. This statement at the end of that section makes it seem like updating entries only works within the same file: "Later sections in the file add to the already parsed setup."

Quote:
Originally Posted by Peace-Maker View Post
The idea was to avoid duplicate function hook info in the gamedata file, which appears to have been a stupid one. Sorry, but I think it's too late now to change the behavior - I'm not even sure what the right thing would be :D
I'm not sure either. It seems fine to leave it this way now that I understand the behavior.

Quote:
Originally Posted by Peace-Maker View Post
I could add a server command which dumps all active detours and the plugins which are listening for them. It might be useless for detours and hooks created using the API instead of the "Functions" section though, since there is no name associated with the hook. But maybe we could print other relevant info which helps to identify which function is being hooked.
Sounds good. I haven't tried to create detours/hooks using the API yet, so I wouldn't know what other relevant info could even be made available with that potential command.
__________________
Psyk0tik is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-26-2021 , 04:51   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #2

Dhooks itself doesn't do anything game specific that could break after an update. The plugins probably need updated gamedata.
__________________
Peace-Maker is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 06-26-2021 , 09:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #3

Quote:
Originally Posted by Peace-Maker View Post
Dhooks itself doesn't do anything game specific that could break after an update. The plugins probably need updated gamedata.
Yeah, i didn't say that DHooks caused these crashes. Tried to update gamedata manually but idk which is outdated (used VTable Dumper to check but it seems that every gamedata config has up to date offsets, not sure about signatures though. Do Linux signatures change often like Windows' do?).

EDIT: VTable prints 264 and 265 offsets
Code:
L	W	Function
265	264	CBasePlayer::Weapon_Equip(CBaseCombatWeapon*)
but SM gamedata has this
Code:
			"WeaponEquip"
			{
				"windows"	"265"
				"linux"		"266"
				"mac"		"266"
			}
EDIT 2: OK, it seems that Hit Registration Fix Plugin had outdated offsets. Increased them by 1.
__________________

Last edited by MAGNAT2645; 06-26-2021 at 12:27.
MAGNAT2645 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-30-2021 , 06:55   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #4

I've released a new version which includes a bunch of stability improvements thanks to the awesome crash reports by the community! Grab detours17 from the release post or github releases.


Changelog:
  • Allow returning NULL for CBaseEntity return types by setting the return value to -1 (thanks arthurdead)
  • Allow specifying object argument size in hexadecimal in gamedata similar to SM 1.11
  • Fix SourceHook context leak when superceding virtual hooked functions (thanks nosoop and BotoX Drifter321#2)
    • This fixes a long standing issue with memory leaks, crashes and lag on map change
  • Fix crash on CentOS7+ / SELinux with "allow_execheap" disabled (thanks vintagepc #22)
  • Fix DHookIsNullParam checking wrong parameter for detour setups with parameters passed in custom registers (thanks GAMMACASE #15)
  • Fix crash due to mismatching new[] + delete[] pair of return value buffer (thanks bottiger)
__________________
Peace-Maker is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 08-10-2021 , 23:26   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #5

Hi Peace, first off thanks so much for this update, I fired up the game for first time in many months and get this error for first time,

Code:
L 08/10/2021 - 21:14:02: SourceMod error session started
L 08/10/2021 - 21:14:02: Info (map "c5m1_waterfront") (file "C:\L4D2\left4dead2\addons\sourcemod\logs\errors_20210810.log")
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: ForceNextStage
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: CancelStagger
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: RegisterForbiddenTarget
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: UnRegisterForbiddenTarget
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to load "UseHealingItems" signature.
L 08/10/2021 - 21:14:08: Error log file session closed.
jking is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 08-10-2021 , 23:33   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #6

Quote:
Originally Posted by jking View Post
Hi Peace, first off thanks so much for this update, I fired up the game for first time in many months and get this error for first time,

Code:
L 08/10/2021 - 21:14:02: SourceMod error session started
L 08/10/2021 - 21:14:02: Info (map "c5m1_waterfront") (file "C:\L4D2\left4dead2\addons\sourcemod\logs\errors_20210810.log")
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: ForceNextStage
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: CancelStagger
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: RegisterForbiddenTarget
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to find signature: UnRegisterForbiddenTarget
L 08/10/2021 - 21:14:02: [left4dhooks.smx] Failed to load "UseHealingItems" signature.
L 08/10/2021 - 21:14:08: Error log file session closed.
DHooks has nothing to do with those errors. Read the errors carefully as they clearly tell you which plugin they're coming from. There have been a few L4D2 updates so far this year that broke a lot of signatures.
__________________
Psyk0tik is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 08-11-2021 , 17:07   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #7

Quote:
Originally Posted by Psyk0tik View Post
DHooks has nothing to do with those errors. Read the errors carefully as they clearly tell you which plugin they're coming from. There have been a few L4D2 updates so far this year that broke a lot of signatures.
Man I'm dumb, last night late, like I said I hadn't played in months and just before I had quit then, I just started to use Silvers Left 4 DHooks Direct (1.51),now all is well with his new version, thanks again as always to all of you that make our experience more pleasant.
jking is offline
Levchik97
Junior Member
Join Date: Nov 2013
Old 09-22-2021 , 17:52   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #8

Please update Gamedata
Levchik97 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-22-2021 , 18:23   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #9

Quote:
Originally Posted by Levchik97 View Post
Please update Gamedata
DHooks doesn't have any gamedata - you need to look at the plugins you have using DHooks.
__________________
asherkin is offline
Levchik97
Junior Member
Join Date: Nov 2013
Old 09-23-2021 , 03:47   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #10

Quote:
Originally Posted by asherkin View Post
DHooks doesn't have any gamedata - you need to look at the plugins you have using DHooks.
ok, thanks
Levchik97 is offline
Reply



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 01:27.


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