Crash in GatherLateUpdatePrimitives on Networked Game
I've recently come across an error concerning the FLateUpdateManager in UE 4.18. In my game, I implemented the functionality to switch between a "normal" flying spectator and a VR pawn. The pawn is switched on the server and then replicated to the client. When I launch a game and connect with a second spectating player it all works fine. The problem occurs when I switch to the VR pawn on the 2nd player. The game of the 2nd player crahes in:
I have debugged into the code and the call to
returns an array of all the child components, but it is filled with some nullptr values. I believe this is due to the fact that the pawn gets created on the server and is then replicated to the client, but maybe not "fast" enough so that some components have a placeholder value (nullptr).
To work around the problem i set
on the UMotionControllerComponent. But, for the camera there is no such command. All I can think of is to override the
method and to remove the call to the
This seems to me like an awful and hacky workaround.
Is there some better way to assure that these calls don't occur or only get called if the components are properly initialized? Or wouldn't it be better to assure that the method "void USceneComponent::GetChildrenComponents(bool bIncludeAllDescendants, TArray& Children)" does not contain any nullptr values or ignore any nullptr components in "FLateUpdateManager::GatherLateUpdatePrimitives"?
Thank you for your help! Best regards, ZABBA
asked Nov 30 '17 at 08:20 AM in Bug Reports
After further investigation, it appears that this has been fixed internally, and the fix will be available in a later version.
For now, you can make the fix yourself if you're using source by changing the
in LateUpdateManager.cpp to a conditional:
This should resolve the issue.
Have a great day
answered Nov 30 '17 at 06:08 PM
Sean L ♦♦ STAFF
Hey all, dont know if this is related. But we had a smal test build in 4.18.2 in a very simple vr multiplayer environment. Worked locally, but i got the same nullptr errors as soon as the local network that was simulated over the country which added latency and bandwith limitations.
Seems like when things are not fully synchronised it just crashes.. i changed the part suggested here in the lateupdatemanager. Will report if this has resolved our problems.
Follow this question
Once you sign in you will be able to subscribe for any updates here