Description

When using the GameplayDebugger to show GAS debug info, and an AttributeSet has two replicated attributes with different replication conditions, a crash occurs in RegisterReplicatedLifetimeProperty() due to two FRepPropertyDescriptor with the same FRepPropertyDescriptor::RepIndex being registered but different FRepPropertyDescriptor::Condition. The following check fails:

// Can't have different conditions if the RepIndex matches, doesn't make sense
check(Condition == Other.Condition); 
Steps to Reproduce

In a project with GAS basics set up:

  • Define a C++ attribute set UMyAttributeSet with two attributes Attribute1 and Attribute 2
  • Define a GetLifetimeReplicatedProps() function for it to make the attributes replicated. Give them different replication conditions like this:

 

void UMyAttributeSet::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
    Super::GetLifetimeReplicatedProps(OutLifetimeProps);
    DOREPLIFETIME_CONDITION_NOTIFY(UMyAttributeSet, Attribute1, COND_InitialOnly, REPNOTIFY_Always);
    DOREPLIFETIME_CONDITION_NOTIFY(UMyAttributeSet, Attribute2, COND_None, REPNOTIFY_Always);
} 

 

  • Let your pawn have an AbilitySystemComponent that has a MyAttributeSet

Once repro is setup:

  • Start PIE
  • Open GameplayDebugger with backwards apostrophe '
  • Press Numpad 3 to enable the Abilities category
  • The crash should occur now due to the following check failing:
check(Condition == Other.Condition); 

 

Callstack

>    [Inline Frame] UnrealEditor-Engine.dll!FLifetimeProperty::operator==(const FLifetimeProperty &) Line 339    C++
     UnrealEditor-Engine.dll!RegisterReplicatedLifetimeProperty(const NetworkingPrivate::FRepPropertyDescriptor & PropertyDescriptor, TArray<FLifetimeProperty,TSizedDefaultAllocator<32>> & OutLifetimeProps, const FDoRepLifetimeParams & Params) Line 70    C++
     UnrealEditor-Engine.dll!RegisterReplicatedLifetimeProperty(const FProperty * ReplicatedProperty, TArray<FLifetimeProperty,TSizedDefaultAllocator<32>> & OutLifetimeProps, const FDoRepLifetimeParams & Params) Line 93    C++
     UnrealEditor-GASRepro53.dll!UMyAttributeSet::GetLifetimeReplicatedProps(TArray<FLifetimeProperty,TSizedDefaultAllocator<32>> & OutLifetimeProps) Line 12    C++
     UnrealEditor-GameplayAbilities.dll!FGameplayDebuggerCategory_Abilities::CollectAttributeData(const APlayerController * OwnerPC, const UAbilitySystemComponent * AbilityComp) Line 260    C++
     UnrealEditor-GameplayAbilities.dll!FGameplayDebuggerCategory_Abilities::CollectData(APlayerController * OwnerPC, AActor * DebugActor) Line 183    C++
     UnrealEditor-GameplayDebugger.dll!AGameplayDebuggerCategoryReplicator::CollectCategoryData(bool bForce) Line 897    C++
     UnrealEditor-Engine.dll!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 281    C++
     [Inline Frame] UnrealEditor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> &) Line 316    C++
     UnrealEditor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() Line 642    C++
     UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 501    C++
     [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 478    C++
     UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779    C++
     UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668    C++
     [Inline Frame] UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Line 1428    C++
     UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FBaseGraphTask>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1499    C++
     UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 850    C++
     UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1904    C++
     UnrealEditor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 776    C++
     UnrealEditor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1501    C++
     UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2143    C++
     UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 551    C++
     UnrealEditor.exe!FEngineLoop::Tick() Line 5904    C++

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-237604 in the post.

0
Login to Vote

Unresolved
ComponentUE - Gameplay - Gameplay Ability System
Affects Versions5.5
Target Fix5.6
CreatedJan 10, 2025
UpdatedJan 14, 2025
View Jira Issue