When garbage collection runs in Editor config, I often get a crash with the following callstack
> UnrealEditor-HoudiniEngineRuntime-Win64-Debug.dll!FHoudiniEngineRuntime::UnRegisterHoudiniComponent(UHoudiniAssetComponent * HAC) Line 204 C++
UnrealEditor-HoudiniEngineRuntime-Win64-Debug.dll!UHoudiniAssetComponent::~UHoudiniAssetComponent() Line 287 C++
[External Code]
UnrealEditor-CoreUObject-Win64-Debug.dll!FObjectPurge::DestroyObjects(bool bUseTimeLimit, double TimeLimit, double StartTime) Line 827 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!IncrementalDestroyGarbage(bool bUseTimeLimit, double TimeLimit) Line 4851 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!IncrementalPurgeGarbage(bool bUseTimeLimit, double TimeLimit) Line 4525 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!PurgeAllUObjectsOnExit() Line 6103 C++
UnrealEditor-CoreUObject-Win64-Debug.dll!StaticExit() Line 5496 C++
...
This is caused by the Houdini Asset Component being passed for unregistration while its own destructor is running. An object in the middle of destruction is invalid, and triggers memory sanitizers when running Debug configurations.
The proper way to clean up Unreal code is in the BeginDestroy event on UObject, which UHoudiniAssetComponent already implements to do the same thing. I suggest the destructor simply be removed, Unreal code should not be invoked from C++ destructors, as dependent objects might be cleaned by the garbage collector at that point.
When garbage collection runs in Editor config, I often get a crash with the following callstack
This is caused by the Houdini Asset Component being passed for unregistration while its own destructor is running. An object in the middle of destruction is invalid, and triggers memory sanitizers when running Debug configurations.
The proper way to clean up Unreal code is in the
BeginDestroyevent onUObject, whichUHoudiniAssetComponentalready implements to do the same thing. I suggest the destructor simply be removed, Unreal code should not be invoked from C++ destructors, as dependent objects might be cleaned by the garbage collector at that point.