We recently had a few occurrences of crashes caused by a "Fatal world leaks detected" error when unloading a level (in a packaged game and in editor).
I tracked down what was keeping a references to a uobject preventing the world to be GCed and it led me to the sequencer, a TStrongObjectPtr was still holding a reference to an animation blueprint. The pointer was assigned by OutCachedValue.CachedAnimInstance.Reset(Component->AnimScriptInstance); in FPreAnimatedSkeletalAnimationTraits::CachePreAnimatedValue() but FPreAnimatedSkeletalAnimationTraits::RestorePreAnimatedValue was never called even though the sequence had stopped playing.
It turns out that this issue happen in some very specific conditions. I've put some details in the repro steps and project, but the main factors are the following:
What happens is that when the main sequence stops:
Steps to Reproduce
In the provided repro project, just open the Level, hit play in editor, and the crash should happen after 2 seconds.
<p>
</p>
The main elements to trigger the issue are the following:
<p>
</p>
> [Inline Frame] UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog::__l2::<lambda>() Line 1103 C++
UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, ...) Line 1103 C++
UnrealEditor-CoreUObject.dll!FReferenceChainSearch::FindAndPrintStaleReferencesToObjects(TArrayView<UObject * const,int> ObjectsToFindReferencesTo, EPrintStaleReferencesOptions Options) Line 2038 C++
UnrealEditor-CoreUObject.dll!FReferenceChainSearch::FindAndPrintStaleReferencesToObject(UObject * ObjectToFindReferencesTo, EPrintStaleReferencesOptions Options) Line 1895 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::CheckAndHandleStaleWorldObjectReferences(FWorldContext * InWorldContext) Line 5750 C++
UnrealEditor-Engine.dll!UEngine::LoadMap(FWorldContext & WorldContext, FURL URL, UPendingNetGame * Pending, FString & Error) Line 15693 C++
UnrealEditor-Engine.dll!UEngine::Browse(FWorldContext & WorldContext, FURL URL, FString & Error) Line 15154 C++
UnrealEditor-Engine.dll!UEngine::TickWorldTravel(FWorldContext & Context, float DeltaSeconds) Line 15352 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2114 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 550 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5877 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 69 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 266 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 317 C++
[Inline Frame] UnrealEditor.exe!invoke_main() Line 102 C++
UnrealEditor.exe!__scrt_common_main_seh() Line 288 C++
kernel32.dll!00007ff8734d259d() Unknown
ntdll.dll!00007ff87530af38() Unknown
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-282364 in the post.
0 |
Component | UE - Anim - Sequencer |
---|---|
Affects Versions | 5.5 |
Target Fix | 5.7 |
Created | May 14, 2025 |
---|---|
Updated | May 26, 2025 |