Skip to content

Fix(core): Unload crash fixes and unload button#899

Open
Tessio wants to merge 1 commit intoYimMenu:enhancedfrom
Tessio:fix-unload-crash
Open

Fix(core): Unload crash fixes and unload button#899
Tessio wants to merge 1 commit intoYimMenu:enhancedfrom
Tessio:fix-unload-crash

Conversation

@Tessio
Copy link

@Tessio Tessio commented Feb 24, 2026

  • main.cpp: fixed destruction order (ScriptMgr→NativeHooks→FiberPool→Hooking)
  • AnticheatBypass.cpp: prevent duplicate hooks with HooksInitialized
  • Hooking.cpp: improved cleanup process
  • DetourHook.hpp: use MH_RemoveHook in destructor
  • NativeHooks.cpp: clear registered programs and hooks
  • ScriptMgr.cpp: add 100ms delay for clean script shutdown
  • Settings.cpp: add unload button in Hotkeys category

 - main.cpp: fixed destruction order (ScriptMgr→NativeHooks→FiberPool→Hooking)
 - AnticheatBypass.cpp: prevent duplicate hooks with s_HooksInitialized
 - Hooking.cpp: improved cleanup process
 - DetourHook.hpp: use MH_RemoveHook in destructor
 - NativeHooks.cpp: clear registered programs and hooks
 - ScriptMgr.cpp: add 100ms delay for clean script shutdown
 - Settings.cpp: add unload button in Hotkeys category
@xesdoog
Copy link
Contributor

xesdoog commented Feb 24, 2026

I think you should add this fix to TemplateHellBase if you don't mind.

@Tessio
Copy link
Author

Tessio commented Feb 24, 2026

I think you should add this fix to TemplateHellBase if you don't mind.

Unless this is sarcasm that I have failed to detect, isn't that the main “forgotten” base of this project?

@xesdoog
Copy link
Contributor

xesdoog commented Feb 24, 2026

Unless this is sarcasm that I have failed to detect, isn't that the main “forgotten” base of this project?

It's a template repository that this menu and HorseMenu were generated from and both have the same unload crash issue. The template is actually a very solid base and I've used it for two different projects completely unrelated to GTA and the RAGE engine. Both also had the same unload issue which means the problem is in the base itself, hence the request to add the fix to the template.

@Tessio
Copy link
Author

Tessio commented Feb 25, 2026

Unless this is sarcasm that I have failed to detect, isn't that the main “forgotten” base of this project?

It's a template repository that this menu and HorseMenu were generated from and both have the same unload crash issue. The template is actually a very solid base and I've used it for two different projects completely unrelated to GTA and the RAGE engine. Both also had the same unload issue which means the problem is in the base itself, hence the request to add the fix to the template.

As the mechanic would say, It's comin' at ya!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants