Crash in UMovieSceneEntitySystem::Abandon on level exit

Hello, during our open test we have seen a lot of crashes in UMovieSceneEntitySystem::Abandon across all the platforms (Android, iOS, Windows).

It happen only on maps with LevelSequence actors on them. It’s something random as we couldn’t reproduce it locally.

According to logs (you can find the attached) it happens at the moment of exiting from the map:

[2025.10.06-15.15.22:510][745]LogWorld: UWorld::CleanupWorld for PLVL_16_Holland, bSessionEnded=true, bCleanupResources=true

It seems that in FMovieSceneEntitySystemGraph::Shutdown we try to call UMovieSceneEntitySystem::Abandon for the system that has already been deleted.

The only idea we have right now is to try to get rid of this crash by wrapping this call in if (IsValid(Nodes.Array[Index].System)) which might potentially cover this case.

Could you please check if you have something similar in the know issues or maybe you have some ideas how to solve it or at least get more info?

Hey Alexander - this is a curious report that we have not encountered before.

It shouldn’t be possible for the entity systems to be completely destroyed before either Unlink or Abandon has been called on them due to the implementation of `UMovieSceneEntitySystem::IsReadyForFinishDestroy` which essentially tells the GC that it cannot be collected unless Unlink has been called (in which case it cannot exist in the SystemGraph container of its Linker), or Abandon has been called.

It sounds like the Linker ptr is being reset by some other means, but it is not clear why or how. One thing to check would be what the value of gc.PendingKillEnabled for your project. If that is enabled then I think there is a way for the GC to actually null out the Linker ptr without telling anything, which could result in the symptom you are describing.

Hello Andrew,

For some reason I don’t see gc.PendingKillEnabled cvar in our version of UE.

[Image Removed]

Regarding the other GC cvars, since our previous open test, where we didn’t see such crashes, we have enabled the following settings:

[/Script/Engine.GarbageCollectionSettings]
gc.AssetClustreringEnabled=True
gc.ActorClusteringEnabled=True
 
[ConsoleVariables]
gc.AllowIncrementalReachability=1
gc.AllowIncrementalGather=1
gc.IncrementalReachabilityTimeLimit=0.002

Could it be the reason of such behavior?

Ah my mistake, it is actually not a formal cvar, but only specifiable through config settings inside `/Script/Engine.GarbageCollectionSettings` and is now deprecated in favor of the renamed `gc.GarbageEliminationEnabled` (which is also seen on `UObjectBaseUtility::IsGarbageEliminationEnabled`

Thank you! Now I see it.

It seems that this option is enabled by default:

https://github.com/EpicGames/UnrealEngine/blob/5\.5/Engine/Config/BaseEngine.ini\#L1617

so we have it enabled as well.

Do you think it’s worth trying to disable it to see if that helps get rid of the crashes?

If yes, could you please highlight the downsides of this option being disabled?

Ok, I think this explains it. Sadly our biggest test case relies on this being disabled, but if we’ve assessed the cause correctly, I think you should be seeing nullptrs inside FMovieSceneEntitySystemGraph::Shutdown()? If that’s the case (and they’re not garbage pointers) then a null check here should be fine.

If you’re seeing garbage pointers in there, then there is perhaps a vulnerability in the way FMovieSceneEntitySystemGraphNodes::AddStructReferencedObjects is implemented that means those references are not being visited by the garbage collector correctly

Hello Andrew,

Thank you for your support, we’re about to release the patch with the check for nullptr, I will let you know if it helps to get rid of the crash

Hello Andrew,

We’ve released the patch with the following check being added:

if (Nodes.Array[Index].System)
{
	Nodes.Array[Index].System->Abandon();
}

And the crash has disappeared, so your theory was correct.

Great to hear, thanks! We’ll get that fix rolled into the engine as well.