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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
vanz
Junior Member
Join Date: Apr 2020
Old 06-02-2020 , 14:47   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #761

Can you provide access to the function return address? I needed to check if function were being called from a specific location. That would be a cool feature

Last edited by vanz; 06-02-2020 at 14:50.
vanz is offline
Crasher_3637
AlliedModders Donor
Join Date: May 2012
Old 06-03-2020 , 14:52   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #762

I am getting crashes related to DHooks after upgrading to 2.2.0-detours13. I'm not sure if it's DHooks itself causing it or a plugin I have installed.

I'm not sure exactly what information I need to provide.

https://crash.limetech.org/n2yav6jbbmt7

Code:
EXCEPTION_ACCESS_VIOLATION_READ accessing 0xfffffffc

Thread 0 (crashed):
   0: dhooks.ext.dll!CHook::HookHandler(HookType_t) [ hook.cpp:159 + 0x9 ]
      eip: 0x64c8e916  esp: 0x001dc954  ebp: 0x001dc960  ebx: 0x17838700
      esi: 0x00000004  edi: 0x00000000  eax: 0x00000000  ecx: 0x00000000
      edx: 0x013ef250  efl: 0x00210246  

      64c8e90a  53           push ebx
      64c8e90b  75 35        jnz 0x64c8e942
      64c8e90d  8b 5d 08     mov ebx, [ebp+0x8]
      64c8e910  8b 4b 44     mov ecx, [ebx+0x44]
      64c8e913  8b 43 40     mov eax, [ebx+0x40]
  >   64c8e916  8b 54 88 fc  mov edx, [eax+ecx*4-0x4]
      64c8e91a  8d 41 ff     lea eax, [ecx-0x1]
      64c8e91d  89 43 44     mov [ebx+0x44], eax
      64c8e920  83 fa 02     cmp edx, 0x2
      64c8e923  75 0d        jnz 0x64c8e932
      64c8e925  8b 4b 18     mov ecx, [ebx+0x18]

      001dc954  00 00 00 00 5e c7 64 11  44 d3 9e 11 b4 ca 1d 00  ....^.d.D.......
      001dc964  0b 67 45 16                                       .gE.            

      Found via instruction pointer in context
__________________
AFK like JFK
Crasher_3637 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-04-2020 , 06:39   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #763

Quote:
Originally Posted by Crasher_3637 View Post
I am getting crashes related to DHooks after upgrading to 2.2.0-detours13. I'm not sure if it's DHooks itself causing it or a plugin I have installed.

I'm not sure exactly what information I need to provide.

https://crash.limetech.org/n2yav6jbbmt7
That looks like a regression from the recursive call fixes in detours11. I've pushed a fix for it, but would like to hold off on releasing another version just yet, since there seems to be quite a volume of reports and requests lately and I don't want to spam releases. You could roll back to detours10 in the mean time if you don't hit any of the cases fixed in later versions.

Quote:
Originally Posted by vanz View Post
Can you provide access to the function return address? I needed to check if function were being called from a specific location. That would be a cool feature
Sounds like a nice way to prevent the need to detour the caller just to set a flag for the actual callee. I'll see how that can be added for vtable hooks and detours. I'd like to avoid adding another Handle type to push to the hook handler callbacks in plugins. The callback function signature is complicated as is already. Maybe some global stack of active hooks and their return addresses could be a way and just a DHookGetReturnAddress() native without any context arguments to get the top of that stack? Sounds messy though.
__________________
Peace-Maker is offline
Mi.Cura
Senior Member
Join Date: Dec 2016
Location: Brazil
Old 06-07-2020 , 17:07   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #764

hi,
When using this plugin the server does not start, there was an update to:
dhooks-2.2.0-detours13-sm110

https://forums.alliedmods.net/showth...86#post2588686

After removing the plugin it returned to work.

P.s: I'm use SourceMod v1.11.0.6567
__________________

Last edited by Mi.Cura; 06-07-2020 at 17:10.
Mi.Cura is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 06-07-2020 , 17:36   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #765

Same here the latest v13 is causing crash on server start too. Windows SM 1.10. If you need more info I can try to figure out which plugin is causing and maybe what part of gamedata but guess some changes in last few updates broke existing plugins/gamedata. Currently using v9 (don't have any newer ones). If you need testing newer version, feel free to PM me a Windows binary (can't compile myself)
__________________

Last edited by Silvers; 06-07-2020 at 17:37.
Silvers is offline
Crasher_3637
AlliedModders Donor
Join Date: May 2012
Old 06-07-2020 , 17:53   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #766

Peace-Maker already addressed the issue above (or previous page idk). He said to just revert to detours10 since a change in detours11 is causing the startup crash.
__________________
AFK like JFK
Crasher_3637 is offline
Mi.Cura
Senior Member
Join Date: Dec 2016
Location: Brazil
Old 06-08-2020 , 09:54   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #767

It would be very helpful to be able to make the previous version available in the initial post.
Because some servers are rented in companies that do not allow transfer of dll's via FTP, and the installation is done by a control panel.

So, the links that are now available for installation, no longer have the previous version.

Now only the latest version is available, which is not working properly causing crashes.
__________________

Last edited by Mi.Cura; 06-08-2020 at 09:56.
Mi.Cura is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 06-08-2020 , 11:05   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #768

Quote:
Originally Posted by Mi.Cura View Post
It would be very helpful to be able to make the previous version available in the initial post.
Because some servers are rented in companies that do not allow transfer of dll's via FTP, and the installation is done by a control panel.
Judgement of those companies aside, version 8 through 13 of dhooks+detours are available on the releases page.
Better hope whoever wrote that control panel can update accordingly.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is online now
Mi.Cura
Senior Member
Join Date: Dec 2016
Location: Brazil
Old 06-09-2020 , 09:34   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #769

Quote:
Originally Posted by nosoop View Post
Judgement of those companies aside, version 8 through 13 of dhooks+detours are available on the releases page.
Better hope whoever wrote that control panel can update accordingly.

Thanks for the idea.
__________________
Mi.Cura is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-09-2020 , 10:03   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #770

I've released a new version detours14 with the mentioned crash fixed and more.
  • Fix regression crash with post-only detours from recursive call fix in detours11 (Thanks Crasher_3637)
  • Include sdktools.inc in include file for DHookSetFromConf native (Thanks ClaudiuHKS #4)
  • Fix crash when trying to call hook removal callback on unloaded plugin (Thanks FortyTwoFortyTwo Drifter321#3)
__________________
Peace-Maker 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 05:52.


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