Description

Calling the NetSerialize() function of FUniqueNetIdRepl from a custom NetSerialize() causes a crash. This only seems to occur when the struct is part of an array RPC parameter.

Steps to Reproduce

Run attached project with a dedicated server and one client, and on the clients' machine, run the following console commands to test the issue:

CallTestRPC 0 - This will crash

CallTestRPC 1

CallTestRPC 2 - This will crash

CallTestRPC 3

Callstack
> [Inline Frame] UE4Editor-Engine.dll!FUniqueNetIdRepl::UniqueIdFromString(FName) Line 206 C++
 UE4Editor-Engine.dll!FUniqueNetIdRepl::NetSerialize(FArchive & Ar, UPackageMap * Map, bool & bOutSuccess) Line 351 C++
 UE4Editor-SerializeTest-0003.dll!FSerializeTest::NetSerialize(FArchive & Ar, UPackageMap * Map, bool & bOutSuccess) Line 41 C++
 UE4Editor-CoreUObject.dll!FStructProperty::NetSerializeItem(FArchive & Ar, UPackageMap * Map, void * Data, TArray<unsigned char,TSizedDefaultAllocator<32>> * MetaData) Line 165 C++
 UE4Editor-Engine.dll!FRepLayout::SerializeProperties_r(FBitArchive & Ar, UPackageMap * Map, const int CmdStart, const int CmdEnd, UE4_RepLayout_Private::TRepDataBufferBase<0,unsigned char> Data, bool & bHasUnmapped, const int ArrayIndex, const int ArrayDepth, const FRepSerializationSharedInfo & SharedInfo, FNetTraceCollector * Collector) Line 6242 C++
 UE4Editor-Engine.dll!FRepLayout::ReceivePropertiesForRPC(UObject * Object, UFunction * Function, UActorChannel * Channel, FNetBitReader & Reader, UE4_RepLayout_Private::TRepDataBufferBase<0,unsigned char> Data, TSet<FNetworkGUID,DefaultKeyFuncs<FNetworkGUID,0>,FDefaultSetAllocator> & UnmappedGuids) Line 6602 C++
 UE4Editor-Engine.dll!FObjectReplicator::ReceivedRPC(FNetBitReader & Reader, const FReplicationFlags & RepFlags, const FFieldNetCache * FieldCache, const bool bCanDelayRPC, bool & bOutDelayRPC, TSet<FNetworkGUID,DefaultKeyFuncs<FNetworkGUID,0>,FDefaultSetAllocator> & UnmappedGuids) Line 1190 C++
 UE4Editor-Engine.dll!FObjectReplicator::ReceivedBunch(FNetBitReader & Bunch, const FReplicationFlags & RepFlags, const bool bHasRepLayout, bool & bOutHasUnmapped) Line 1072 C++
 UE4Editor-Engine.dll!UActorChannel::ProcessBunch(FInBunch & Bunch) Line 2845 C++
 UE4Editor-Engine.dll!UActorChannel::ReceivedBunch(FInBunch & Bunch) Line 2686 C++
 UE4Editor-Engine.dll!UChannel::ReceivedSequencedBunch(FInBunch & Bunch) Line 391 C++
 UE4Editor-Engine.dll!UChannel::ReceivedNextBunch(FInBunch & Bunch, bool & bOutSkipAck) Line 805 C++
 UE4Editor-Engine.dll!UChannel::ReceivedRawBunch(FInBunch & Bunch, bool & bOutSkipAck) Line 489 C++
 UE4Editor-Engine.dll!UNetConnection::ReceivedPacket(FBitReader & Reader, bool bIsReinjectedPacket) Line 2702 C++
 UE4Editor-Engine.dll!UNetConnection::ReceivedRawPacket(void * InData, int Count) Line 1312 C++
 UE4Editor-OnlineSubsystemUtils.dll!UIpNetDriver::TickDispatch(float DeltaTime) Line 1371 C++
 [Inline Frame] UE4Editor-Engine.dll!TMemberFunctionCaller<UNetDriver,void (__cdecl UNetDriver::*)(float)>::operator()(float &) Line 156 C++
 [Inline Frame] UE4Editor-Engine.dll!UE4Tuple_Private::TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter(TMemberFunctionCaller<UNetDriver,void (__cdecl UNetDriver::*)(float)> &&) Line 272 C++
 [Inline Frame] UE4Editor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,UNetDriver,TTypeWrapper<void> __cdecl(float)>::Execute(float) Line 654 C++
 UE4Editor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float)>::ExecuteIfSafe(float <Params_0>) Line 716 C++
 UE4Editor-Engine.dll!TBaseMulticastDelegate<void,float>::Broadcast(float <Params_0>) Line 981 C++
 UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1282 C++
 UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1695 C++
 UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 411 C++
 UE4Editor.exe!FEngineLoop::Tick() Line 4806 C++
 [Inline Frame] UE4Editor.exe!EngineTick() Line 62 C++
 UE4Editor.exe!GuardedMain(const wchar_t * CmdLine) Line 169 C++
 UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 257 C++
 [External Code]

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-95013 in the post.

0
Login to Vote

Unresolved
ComponentNetworking
Affects Versions4.24
Target Fix4.26
CreatedJun 29, 2020
UpdatedJun 30, 2020