peace-maker / DHooks2

Dynamic detouring support for the DHooks 2 SourceMod extension
https://forums.alliedmods.net/showthread.php?p=2588686#post2588686
67 stars 11 forks source link

Crash on Plugin Unload #17

Closed Blunderstab closed 3 years ago

Blunderstab commented 3 years ago

While using https://github.com/nosoop/SM-TFOnTakeDamage, server crashes can happen when plugins are unloaded.

This was happening while I had an SDKHook for OnTakeDamageAlive.

public void OnClientPutInServer(int player) {
    SDKHook(player, SDKHook_OnTakeDamageAlivePost, OnTakeDamageAlivePost);
}

If all plugins were active when I joined the server, unloading plugins would cause a crash. If TFOnTakeDamage, DHooks, or the plugin with the SDKHook were inactive upon joining the server and then loaded in, unloading the plugins would not cause a server crash.

I just updated to DHooks (2.2.0-detours16), and my SM version is 1.10.0.6488. I was using 14a previously, I believe.

peace-maker commented 3 years ago

Could you please install Accelerator and link to one of those crashes?

Blunderstab commented 3 years ago

Oops, I'd already done that and just forgotten it! Haha https://crash.limetech.org/g4xzsew4f53j

peace-maker commented 3 years ago

Can you test if this issue was fixed in the latest release of detours17 please?

Blunderstab commented 3 years ago

Seems to be fine now.