I have a replication issue that I cannot solve. I have a BP actor on a level, which is replicated, always relevant, and has Net Load on client set to true.
On BeginPlay, I call the following:
Basically on the server I compute and set a replicated & notify variable.
If I run this in PIE with a listen server, the replicated value gets set and the OnRep
method associated to this variable is called on both the server and the clients.
However, in a packaged game, after a seamless travel, the variable never gets updated on the clients and OnRep
is never called (but it still is on server). This happens when I run two instances of a game in standalone (right click on project file > Launch Game).
If I add a DELAY in there, everything works as expected:
My understanding though is that this replicated & always relevant actor in the level should send its data to clients when they are ready, hence trigger the replication and the OnRep
on clients as well, but this is not what’s happening. It looks as if the first replication message from the server is lost on the clients.
Can some kind soul give me a pointer?
Thank you,
r.
PS: Adding or removing the Force Net Update
has no effect.
PS2: I do see an error in the server logs, but google does not help and I don’t know whether this is related (also, it happens in a TMP level which I imagine is the transition map?):
[2022.10.15-15.39.16:330][353]LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: Level /Temp/Untitled_1.Untitled:PersistentLevel NOT Supported.
[2022.10.15-15.39.16:330][353]LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: Level /Temp/Untitled_1.Untitled:PersistentLevel NOT Supported.
[2022.10.15-15.39.16:392][356]LogNet: Server connection received: ActorChannelFailure [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 192.168.1.56:58856, Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_0, IsServer: YES, PC: MST_PC_Lobby_C_1, Owner: MST_PC_Lobby_C_1, UniqueId: NULL:DESKTOP-P0PSOPM-1BEC658845F4BBCFC437C595C0121D07
[2022.10.15-15.39.16:849][363]LogStats: FPlatformStackWalk::StackWalkAndDump - 0.224 s
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: === Handled ensure: ===
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error:
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: Ensure condition failed: Resource->bProduced || Resource->bExternal || Resource->bQueuedForUpload [File:D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderGraphValidation.cpp] [Line: 580]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: Pass Post Pass: InstanceCull has a read dependency on Nanite.OccludedInstances, but it was never written to.
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: Stack:
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa787a743 UnrealEditor-RenderCore.dll!<lambda_99a2a98958c2219bcef246c0b7d4bf00>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderGraphValidation.cpp:578]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa7877e65 UnrealEditor-RenderCore.dll!<lambda_1c67f225222ca53d5338410ea21c0e6b>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderGraphValidation.cpp:680]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa786108b UnrealEditor-RenderCore.dll!FRDGParameterStruct::Enumerate<<lambda_1c67f225222ca53d5338410ea21c0e6b> >() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Public\RenderGraphParameters.inl:15]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa78cd5f7 UnrealEditor-RenderCore.dll!FRDGUserValidation::ValidateAddPass() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderGraphValidation.cpp:742]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa782ba1c UnrealEditor-RenderCore.dll!FRDGBuilder::SetupPass() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderGraphBuilder.cpp:1771]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4d786d0b UnrealEditor-Renderer.dll!FComputeShaderUtils::AddPass<FInstanceCull_CS>() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Public\RenderGraphUtils.h:549]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4d7c0d39 UnrealEditor-Renderer.dll!Nanite::AddPass_InstanceHierarchyAndClusterCull() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\Nanite\NaniteCullRaster.cpp:1634]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4d7cf799 UnrealEditor-Renderer.dll!Nanite::CullRasterize() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\Nanite\NaniteCullRaster.cpp:2652]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4d7ce257 UnrealEditor-Renderer.dll!Nanite::CullRasterize() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\Nanite\NaniteCullRaster.cpp:2719]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4d1d7243 UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\DeferredShadingRenderer.cpp:2441]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4dca1d19 UnrealEditor-Renderer.dll!RenderViewFamily_RenderThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:4102]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4dc703a2 UnrealEditor-Renderer.dll!<lambda_220f8abc2f1feaab5010e9f914117006>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:4353]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4dc896ba UnrealEditor-Renderer.dll!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`46'::FDrawSceneCommandName,<lambda_220f8abc2f1feaab5010e9f914117006> >::DoTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Public\RenderingThread.h:193]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff4dc911fa UnrealEditor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`46'::FDrawSceneCommandName,<lambda_220f8abc2f1feaab5010e9f914117006> > >::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:975]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff710f3a9d UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:753]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff710f3f3e UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:642]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff710f42e1 UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2115]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa78b976b UnrealEditor-RenderCore.dll!RenderingThreadMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:380]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffa78bd158 UnrealEditor-RenderCore.dll!FRenderingThread::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:527]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff717c7a2b UnrealEditor-Core.dll!FRunnableThreadWin::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:146]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fff717c0a90 UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:76]
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffc93d7034 KERNEL32.DLL!UnknownFunction []
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error: [Callstack] 0x00007fffcac826a1 ntdll.dll!UnknownFunction []
[2022.10.15-15.39.16:849][363]LogOutputDevice: Error:
[2022.10.15-15.39.16:849][363]LogStats: SubmitErrorReport - 0.000 s
[2022.10.15-15.39.17:433][363]LogStats: SendNewReport - 0.584 s
[2022.10.15-15.39.17:433][363]LogStats: FDebug::EnsureFailed - 0.808 s
[2022.10.15-15.39.27:636][578]LogWorld: BeginTearingDown for /Temp/Untitled_1
[2022.10.15-15.39.27:636][578]LogWorld: UWorld::CleanupWorld for Untitled, bSessionEnded=true, bCleanupResources=true
[2022.10.15-15.39.27:636][578]LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
[2022.10.15-15.39.27:665][578]LogAudio: Display: Audio Device (ID: 1) registered with world 'EX_Map_01'.
[2022.10.15-15.39.27:677][578]LogAudio: Display: Audio Device unregistered from world 'None'.
[2022.10.15-15.39.27:720][578]LogUObjectHash: Compacting FUObjectHashTables data took 1.66ms
[2022.10.15-15.39.27:723][578]LogSubsystemCollection: Failed to initialize subsystem dependency (WorldPartitionSubsystem)
[2022.10.15-15.39.27:723][578]LogChaos: FPhysicsSolverBase::AsyncDt:-1.000000
[2022.10.15-15.39.27:723][578]LogAIModule: Creating AISystem for world EX_Map_01