Hi,
we recently upgraded from 5.4 to 5.6 and are experiencing a crash on leaving PIE in our project.
We narrowed down, that the crash is only ever happening if we try to leave PIE while an Audio from a Widget Animation was playing.
Some more digging and adding additional log in a Source Version of 5.6 in PlayLevel.cpp at line 505 (see code snippet below) helped us discover that a ScrubedSound_Root_* is the root cause of a leaked object being detected. Learning this made the crash a 100% repro for us.
// Make sure that all objects in the temp levels were entirely garbage collected.
TSet<UObject*> LeakedObjectsSet;
TSet<UPackage*> LeakedPackages;
for(FThreadSafeObjectIterator ObjectIt; ObjectIt; ++ObjectIt )
{
UObject* Object = *ObjectIt;
UPackage* ObjectPackage = Object->GetOutermost();
if (ObjectPackage->HasAnyPackageFlags(PKG_PlayInEditor))
{
FString ErrorMessage = FString::Printf(TEXT("Object '%s' from PIE level still referenced.}"), *Object->GetFName().ToString());
FMessageLog(NAME_CategoryPIE).Error()
->AddToken(FUObjectToken::Create(Object, FText::FromString(Object->GetFullName())))
->AddToken(FTextToken::Create(FText::FromString(ErrorMessage)));
LeakedPackages.Add(ObjectPackage);
if (UWorld* TheWorld = UWorld::FindWorldInPackage(ObjectPackage))
{
LeakedObjectsSet.Add(TheWorld);
}
else
{
LeakedObjectsSet.Add(ObjectPackage);
}
}
}
ScrubbedSound_Root_* get added by Sequencer Audio Tracks that have no Actor Bindings in MovieSceneAudioSystem line 1253.
So far we only could verify the crash happens from WidgetAnimations with AudioTracks not from LevelSequences with AudioTracks, but in theory it could be possible.
Is there anything we can do in Launcher Engine to fix this or add a workaround?
Any help appreciated,
Ann