Crash when opening world partition

Crashes when loading the editor if the startup map is a world partition level.

Also crashes when manually loading the level (and setting start up map to none)

Steps to Reproduce

  • Create a WP level (with many assets) in 5.3 and upgrade project to 5.5
  • Load in that level in 5.5.1
  • Observe crash

Temporary Workaround in FWorldPartitionLoadingContext::FDeferred::~FDeferred:

`auto CreateActorList = (TArray<AActor*>& ActorList, const TSet<FWorldPartitionActorDescInstance*>& SourceList) → ULevel*
{
// [goe:start:ShuheiAoki] Prevent GC from collecting actors in the result list
TArray<TStrongObjectPtr> Temp;
Temp.Empty(SourceList.Num());
// [goe:end:ShuheiAoki]

            ActorList.Empty(SourceList.Num());

            ULevel* Level = nullptr;
            for (FWorldPartitionActorDescInstance* ActorDescInstance : SourceList)
            {
                // For async loads, the actor loading might have failed for several reasons, this will be handled here.
                // Also, when cleaning up worlds, actors are already marked as garbage at this point, so no need to remove them from the world.
                if (AActor* Actor = ActorDescInstance->GetActor(); IsValid(Actor))
                {
                    Temp.Add(TStrongObjectPtr(Actor));  // [goe:ShuheiAoki] Prevent GC from collecting actors in the result list
                    ActorList.Add(Actor);

                    ULevel* ActorLevel = Actor->GetLevel();
                    check(!Level || (Level == ActorLevel));
                    Level = ActorLevel;
                }
            }

            return Level;
        };`

Hello,

I apologize for the delay. I don’t recall seeing this reported previously, and couldn’t repro it, although I went from 5.3 to 5.5.4 since it is the version I had on hand at the time.

A couple of questions:

  • Have you tried resaving the content/actors? This is recommended when you upgrade versions.
  • Can you upgrade to 5.5.4 to test if it’s specific to 5.5.1?

If you can do the latter, I would appreciate a stripped-out vanilla project with the issue isolated, since I wasn’t able to repro.

Thanks,

Ryan