Description

I am doing some runtime manipulation of data layers and I am running into a check failure due to a zero guid in FLevelInstanceActorGuid::GetGuid during multiplayer testing.

When I debug FLevelInstanceActorGuid::GetGuid_Internal(), it is because Actor->HasAuthority() is false, because the execution at the time is being run on the simulated proxy, and when this occurs, GetGuid_Internal returns the cached FLevelInstanceActorGuid.ActorGuid.

This value seems to be serialized for PIE in the following function. Problem is, the level instance that is failing this check is nested in a data layer of another level instance, and so this code doesn't run on it.

I added some logs to confirm this hunch, and sure enough the only levels that this serialization code runs are the ones in the PersistentLevel, not anything nested within.

Steps to Reproduce
  • Create a BP class that derives from Level Instance.
  • Enable "Replicates" in the BP.
  • Place this BP into a WP level with behavior as standalone.
  • Create a new WP level for the BP level instance actor to reference.
  • Enable Streaming.
  • Add a runtime data layer that is initially unloaded.
  • Add a standalone level instance that references a WP level with streaming enabled to the data layer.
  • Set Net Mode as "Play as Client"
Callstack

Assertion failed: Actor->IsTemplate() || Guid.IsValid() [...\Engine\Source\Runtime\Engine\Private\LevelInstance\LevelInstanceActorGuid.cpp] [Line: 25]

> UnrealEditor-Engine.dll!FLevelInstanceActorGuid::GetGuid() Line 25 C++
UnrealEditor-Engine.dll!FLevelInstanceActorImpl::OnLevelInstanceLoaded() Line 93 C++
UnrealEditor-Engine.dll!ULevelInstanceSubsystem::RegisterLoadedLevelStreamingLevelInstance(ULevelStreamingLevelInstance * LevelStreaming) Line 374 C++
UnrealEditor-Engine.dll!ULevelStreamingLevelInstance::OnLevelLoadedChanged(ULevel * InLevel) Line 554 C++
UnrealEditor-Engine.dll!ULevelStreaming::SetLoadedLevel(ULevel * Level) Line 1401 C++
UnrealEditor-Engine.dll!ULevelStreaming::PrepareLoadedLevel(ULevel * InLevel, UPackage * InLevelPackage, int InPIEInstanceID) Line 1468 C++
UnrealEditor-Engine.dll!ULevelStreaming::AsyncLevelLoadComplete(const FName & InPackageName, UPackage * InLoadedPackage, EAsyncLoadingResult::Type Result) Line 1784 C++
[Inline Frame] UnrealEditor-Engine.dll!Invoke(void(ULevelStreaming::*)(const FName &, UPackage *, EAsyncLoadingResult::Type) PtrMemFun, ULevelStreaming * &) Line 66 C++
[Inline Frame] UnrealEditor-Engine.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter(void(ULevelStreaming::*)(const FName &, UPackage *, EAsyncLoadingResult::Type) &) Line 320 C++
UnrealEditor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,ULevelStreaming,void __cdecl(FName const &,UPackage *,enum EAsyncLoadingResult::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe(const FName & <Params_0>, UPackage * <Params_1>, EAsyncLoadingResult::Type <Params_2>) Line 689 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!TDelegate<void __cdecl(FName const &,UPackage *,enum EAsyncLoadingResult::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound(const FName &) Line 635 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!FAsyncLoadingThread2::FCompletedPackageRequest::CallCompletionCallbacks() Line 3605 C++
UnrealEditor-CoreUObject.dll!FAsyncLoadingThread2::ProcessLoadedPackagesFromGameThread(FAsyncLoadingThreadState2 & ThreadState, bool & bDidSomething, TArrayView<int const ,int> FlushRequestIDs) Line 8501 C++
UnrealEditor-CoreUObject.dll!FAsyncLoadingThread2::TickAsyncLoadingFromGameThread(FAsyncLoadingThreadState2 & ThreadState, bool bUseTimeLimit, bool bUseFullTimeLimit, double TimeLimit, TArrayView<int const ,int> FlushRequestIDs, bool & bDidSomething) Line 8573 C++
UnrealEditor-CoreUObject.dll!FAsyncLoadingThread2::FlushLoading(TArrayView<int const ,int> RequestIDs) Line 10114 C++
UnrealEditor-CoreUObject.dll!FlushAsyncLoading(TArrayView<int const ,int> RequestIds) Line 348 C++
UnrealEditor-Engine.dll!UWorld::FlushAsyncLevelRequests() Line 4568 C++
[Inline Frame] UnrealEditor-Engine.dll!UWorld::FlushLevelStreaming::__l2::<lambda_1>::operator()() Line 4905 C++
UnrealEditor-Engine.dll!UWorld::FlushLevelStreaming(EFlushLevelStreamingType FlushType) Line 4912 C++
UnrealEditor-Engine.dll!UWorld::BlockTillLevelStreamingCompleted() Line 4434 C++
UnrealEditor-Engine.dll!UEngine::BlockTillLevelStreamingCompleted(UWorld * InWorld) Line 16094 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2153 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 551 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5906 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 60 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 187 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 267 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 335 C++
[Inline Frame] UnrealEditor.exe!invoke_main() Line 102 C++
UnrealEditor.exe!__scrt_common_main_seh() Line 288 C++

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-242229 in the post.

0
Login to Vote

Unresolved
CreatedFeb 3, 2025
UpdatedFeb 3, 2025
View Jira Issue