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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 09-27-2018 , 14:09   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #611

Quote:
Originally Posted by nosoop View Post
So I could disable this extension, or even need it?
paulo_crash is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-27-2018 , 18:07   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #612

Quote:
Originally Posted by paulo_crash View Post
So I could disable this extension, or even need it?
How would we know, if you need an extension or not? Remove it and see if a plugin is asking for it.
__________________
Spirit_12 is offline
Ryan.
Member
Join Date: Jan 2018
Old 11-04-2018 , 00:38   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #613

I've started experiencing a crash since upgrading from Sourcemod 1.9 to the latest dev build, 1.10 (6354). The crash happens on Windows when overriding a DHook'ed function's parameters (i.e. returning MRES_ChangedHandled). Linux works fine.

I don't know whether Sourcemod or DHooks is the issue. I narrowed down the last working version of Sourcemod to be build 6225. It works and crashes just the same whether its DHooks with detours or not.

When I peeked into the dump file it pointed me to one of the Callback functions in DHook's vhook.cpp. I'd guess the 'void Callback' since my hooked function is using ReturnType_Void. Possibly the HandleSecurity line?

I've attached a minimal example plugin to demonstrate the crash. It's for the game No More Room in Hell and will crash whenever the player performs a shove (assuming a Windows host running a Sourcemod build > 6225).
Attached Files
File Type: zip dhooks-crash-with-dump.zip (42.6 KB, 185 views)
__________________

Last edited by Ryan.; 11-04-2018 at 12:12. Reason: Meant Sourcemod 1.10 not 1.11!
Ryan. is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-04-2018 , 05:44   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #614

Build 6225 on which branch? Do you have any Accelerator crash reports?
__________________
asherkin is offline
Ryan.
Member
Join Date: Jan 2018
Old 11-04-2018 , 12:02   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #615

Build 6225 on branch 1.10. I was trying them out from here: https://www.sourcemod.net/downloads....h=master&all=1

Build 6225 works but the next prebuilt binary (build 6228 ) has the crash.

Crash report: https://crash.limetech.org/5ye2ihr7ki24
__________________

Last edited by Ryan.; 11-04-2018 at 12:02.
Ryan. is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-04-2018 , 12:24   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #616

Quote:
Originally Posted by Ryan. View Post
Build 6225 on branch 1.10. I was trying them out from here: https://www.sourcemod.net/downloads....h=master&all=1

Build 6225 works but the next prebuilt binary (build 6228 ) has the crash.

Crash report: https://crash.limetech.org/5ye2ihr7ki24
That crash report doesn't look related.

There are a few significant changes between 1.10+6225 and 1.10+6228 that could cause issues with DHooks, but the one that stands out the most is the new IBinTools interface version - so the first thing that needs trying is to re-build DHooks against the latest 1.10 SourceMod SDK and see if that fixes the problem. DHooks doesn't currently check the return of SM_GET_LATE_IFACE, so it is probably just failing to get the interface in newer SM builds.
__________________
asherkin is offline
Ryan.
Member
Join Date: Jan 2018
Old 11-04-2018 , 12:58   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #617

I'm not sure why the callstack is so different on that crash. Here is the original one: https://crash.limetech.org/wrihcfj3phod

Edit: I tested some more until Accelerator warned about rate limit. I logged a few crashes anonymously after forgetting to set my steamid between installing different Sourcemod versions. There were 2 hangs that I had to kill manually that didn't generate a crash report.

The anonymous reports:
Of the 28 crash reports, 75% are from DHooks.dll + 0x804D. The other 25% are random offsets after some server.dll calls

Edit 2:
Quote:
Originally Posted by asherkin View Post
so the first thing that needs trying is to re-build DHooks against the latest 1.10 SourceMod SDK and see if that fixes the problem.
That fixed it. Any chance we can get an official build to point players to?
__________________

Last edited by Ryan.; 11-15-2018 at 20:47.
Ryan. is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-21-2018 , 10:46   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #618

I've added symbols for the latest dhooks2-dynhooks build to throttle as well, so the stack traces should be more useful now.

Shouldn't dhooks get unloaded if it fails to get a required interface? QueryInterfaceDrop returns false by default and QueryRunning is checking the presence of the interface pointers as well.
__________________
Peace-Maker is offline
Ryan.
Member
Join Date: Jan 2018
Old 11-21-2018 , 20:04   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #619

Damn, still crashing in detours7:

dhooks.ext.dll
server.dll
These crashes are from the plugin I posted above. The plugin pre-hooks a virtual function and changes one parameter. The hooked function's signature is void (float, bool). I'm trying to change the float

Works perfect with no crashes when building detours7 against Sourcemod 1.10 though

Metamod:Source version 1.11.0-dev+1116
SourceMod Version: 1.10.0.6335
__________________

Last edited by Ryan.; 11-21-2018 at 20:17.
Ryan. is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 11-23-2018 , 10:38   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #620

Can confirm detours7 is crashy boi on Windows with 1.10 6354.
Drixevel 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 13:35.


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