Hi,
first of all, thank you for your amazing VR Plugin!
Right now, I have set up a Multiplayer VR project, where the players can enter their name and choose an avatar. For the avatars I use https://readyplayer.me/. The players can load their name (set text->Target Render Component in your VR-Pawn) and their avatar (load new avatar->Target ReadyPlayerMeComponent in your VR-Pawn) at runtime. For explanation, it is an educational setup, where 4 students share one PC. So, the students alternate during the session and is the reason why they can change their names and avatars without having to reconnect. The whole necessary code is in the VR-Pawn: Change Name + Avatar → Event on Server (Reliable) → Multicast (Reliable). Most of the time, everything works as expected (you can set name and load avatar for like 15 times - sometimes only 4 times), but it is also possible, that the application crashes. Right now, I have tracked down it crashes during the Multicast call on the client side.
leads me to my problem and the reason for post. When the application crashes, I get error:
Pure virtual function being called while application was running (GIsRunning == 1).
Furthermore, my log files lead me to the VRCharacterMovementComponent.cpp in Line 603. So, can you maybe explain a little bit what part does?
// Validate move only after old and first dual portion, after all moves are completed.
if (MoveData.NetworkMoveType == FCharacterNetworkMoveData::ENetworkMoveType::NewMove)
{
ServerMoveHandleClientErrorVR(ClientTimeStamp, DeltaTime, ClientAccel, MoveData.Location, ClientControlRotation.Yaw, MoveData.MovementBase, MoveData.MovementBaseBoneName, MoveData.MovementMode);
//ServerMoveHandleClientError(ClientTimeStamp, DeltaTime, ClientAccel, MoveData.Location, MoveData.MovementBase, MoveData.MovementBaseBoneName, MoveData.MovementMode);
}
My logs also guide me to :
Script Stack (1 frames):
Character.ServerMovePacked
Which is found also in VRCharacterMovementComponent.cpp in line 1320.
// Send move to server if character is replicating movement
if (bSendServerMove)
{
SCOPE_CYCLE_COUNTER(STAT_CharacterMovementCallServerMove);
if (ShouldUsePackedMovementRPCs())
{
CallServerMovePacked(NewMove, ClientData->PendingMove.Get(), OldMove.Get());
}
/*else
{
CallServerMove(NewMove, OldMove.Get());
}*/
}
In conclusion, my project is crashing during the Multicast on the client side. The problem remains, if I exclude the avatar loading, so no ReadyPlayerMe stuff, just simple SetText.
Maybe you can help me out with problem or just to prevent the crash? Thank you for your help.
And here is one picture to show the setup. Server has name Server and their avatar. Client 1 has name 11 and avatar 1. Client 2 hast name 22 and avatar 2. Client 3 has name 32 and their avatar 2. Client 4 has name 44 and their avatar.