Download

Dedicated server - Read access violation for SendingRepState

For the past year I’ve been getting rare crashes in RepLayout#UpdateChangelistMgr sometimes during creation of and spawning of an actors/objects.

It crashes on the if statement due to read access violation for variable RepState (See below for stacktrace and the if statement)

Does anyone got any idea what might cause this? I’ve tried Answerhub without any success.

Exception:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xfffffea44d72e304

// See if we can re-use the work already done on a previous connection
		// Rules:
		//	1. We always compare once per frame (i.e. check LastReplicationFrame == ReplicationFrame)
		//	2. We check LastCompareIndex > 1 so we can do at least one pass per connection to compare all properties
		//		This is necessary due to how RemoteRole is manipulated per connection, so we need to give all connections a chance to see if it changed
		//	3. We ALWAYS compare on bNetInitial to make sure we have a fresh changelist of net initial properties in this case
		if (!bForceCompare && GShareShadowState && !RepFlags.bNetInitial && RepState->LastCompareIndex > 1 && InChangelistMgr.LastReplicationFrame == ReplicationFrame)
		{
			INC_DWORD_STAT_BY(STAT_NetSkippedDynamicProps, 1);
			return Result;
		}

Stacktrace:

FRepLayout::UpdateChangelistMgr() [...\Engine\Source\Runtime\Engine\Private\RepLayout.cpp:1273]
FObjectReplicator::ReplicateProperties() [...\Engine\Source\Runtime\Engine\Private\DataReplication.cpp:1755]
UActorChannel::ReplicateActor() [...\Engine\Source\Runtime\Engine\Private\DataChannel.cpp:3248]
UNetDriver::ServerReplicateActors_ProcessPrioritizedActors() [...\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:4733]
UNetDriver::ServerReplicateActors() [...\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:5172]
UNetDriver::TickFlush() [...\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:709]