Branch or Release
- UE4SS_v3.0.1-534-g49eda85 (works as expected)
- UE4SS_v3.0.1-535-g4809391 (crashes the game)
- UE4SS_v3.0.1-788-g9a20a8f - experimental-latest
Game and Engine Version
Astroneer - UE 4.27.2.0
Describe the bug
The Lua function UnregisterHook can cause the game to crash (with UE4SS_v3.0.1-535-g4809391).
With the latest experimental version (UE4SS_v3.0.1-788-g9a20a8f), the game no longer crashes, but it seems that the UnregisterHook function is not executed (and it is not logged in the UE4SS.log file).
The release "UE4SS_v3.0.1-534-g49eda85" works as expected.
Note that I do not encounter this problem with all hooked functions. For example, if I hook "/Script/Engine.PlayerController:ClientRestart" and I call UnregisterHook on it later, the game will not crash (everything is working correctly).
But if I do the same thing on "/Script/Astro.AstroCharacter:GetPlayController" or "/Script/Astro.DeformTool:HandleTerrainTool" then the game crashes (or, with the latest experimental release, UnregisterHook is not executed).
To reproduce
- Edit
UE4SS-settings.ini, add the engine version:
[EngineVersionOverride]
MajorVersion = 4
MinorVersion = 27
-- local hook = "/Script/Engine.PlayerController:ClientRestart" -- this hook works correctly
local hook = "/Script/Astro.AstroCharacter:GetPlayController" -- executed when you respawn and on game started
-- local hook = "/Script/Astro.DeformTool:HandleTerrainTool" -- executed when you equip the "Terrain Tool"
Pre, Post = RegisterHook(hook, function()
print("hook", Pre, Post, "\n")
UnregisterHook(hook, Pre, Post)
end)
.dmp file, UE4SS Log and UE4SS-settings.ini
ue4ss.zip
Desktop:
Branch or Release
Game and Engine Version
Astroneer - UE 4.27.2.0
Describe the bug
The Lua function
UnregisterHookcan cause the game to crash (with UE4SS_v3.0.1-535-g4809391).With the latest experimental version (UE4SS_v3.0.1-788-g9a20a8f), the game no longer crashes, but it seems that the UnregisterHook function is not executed (and it is not logged in the UE4SS.log file).
The release "UE4SS_v3.0.1-534-g49eda85" works as expected.
Note that I do not encounter this problem with all hooked functions. For example, if I hook
"/Script/Engine.PlayerController:ClientRestart"and I callUnregisterHookon it later, the game will not crash (everything is working correctly).But if I do the same thing on
"/Script/Astro.AstroCharacter:GetPlayController"or"/Script/Astro.DeformTool:HandleTerrainTool"then the game crashes (or, with the latest experimental release, UnregisterHook is not executed).To reproduce
UE4SS-settings.ini, add the engine version:Test1Mod.zip
.dmp file, UE4SS Log and UE4SS-settings.ini
ue4ss.zip
Desktop: