Reported by multiple users. When in a networked session a GameplayEffect is automatically removed due to:

  • a tag being added that's not allowed, or (TargetTagRequirements.RemovalTagRequirements.MustHave)
  • a tag being removed that is required (TargetTagRequirements.RemovalTagRequirements.MustNotHave)

an error and ensure are triggered:
LogGameplayEffects: Error: TargetTagRequirementsGameplayEffectComponent_0 tried to unregister GameplayTagEvent 'MyTag.Dependency' on GameplayEffect 'Default__GE_Dependent_C' but failed.
LogAbilitySystem: Error: ~FScopedActiveGameplayEffectLock has 1 pending removes after a scope lock removal

Possibly this is due to the client attempting to remove the same GE twice: once by replication from server and once due to local calculation that the GE should be removed.

Steps to Reproduce

Repro steps in ThirdPerson project with an ASC added to character:

  • Create a GameplayEffect GE_Dependency and GE_Dependent, both infinite duration
  • Let GE_Dependency have a TargetTags GE comp with:
    • AddTags.Added: MyTag.Dependency
  • Let GE_Dependent have a TargetTagRequirements GE comp with:
    • RemovalTagRequirements.MustNotHave = MyTag.Dependency
  • At BeginPlay on server only, add both GEs to the ASC
  • Create a debug key P that sends a server RPC to remove GE_Dependency by handle

Start PIE with server + 1 client. On the client, press the debug key P. This triggers the server removing GE_Dependency. As per GAS rules, GE_Dependent should now be removed because it's missing required tag MyTag.Dependency.

However, now the ensures from the description are hit. Expected: No ensures are hit.


FActiveGameplayEffectsContainer::DecrementLock() GameplayEffect.cpp:5616
[Inlined] FObjectReplicator::PostNetReceive() DataReplication.h:230
FObjectReplicator::PostReceivedBunch() DataReplication.cpp:1513
UActorChannel::ProcessBunch(FInBunch &) DataChannel.cpp:3223
UActorChannel::ReceivedBunch(FInBunch &) DataChannel.cpp:2987
UChannel::ReceivedSequencedBunch(FInBunch &) DataChannel.cpp:560
UChannel::ReceivedNextBunch(FInBunch &,bool &) DataChannel.cpp:1026
UChannel::ReceivedRawBunch(FInBunch &,bool &) DataChannel.cpp:672
UNetConnection::DispatchPacket(FBitReader &,int,bool &,bool &) NetConnection.cpp:3632
UNetConnection::ReceivedPacket(FBitReader &,bool,bool) NetConnection.cpp:2995
UNetConnection::ReceivedRawPacket(void *,int) NetConnection.cpp:1900
UIpNetDriver::TickDispatch(float) IpNetDriver.cpp:1301
UNetDriver::InternalTickDispatch(float) NetDriver.cpp:1597
[Inlined] Invoke(void (UNetDriver::*)(float),UNetDriver *&,float &&) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int> >::ApplyAfter(void (UNetDriver::*&)(float),UNetDriver *&,float &&) Tuple.h:311
TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float),FDefaultDelegateUserPolicy>::ExecuteIfSafe(float) DelegateInstancesImpl.h:665
[Inlined] TMulticastDelegateBase<FDefaultDelegateUserPolicy>::Broadcast(float) MulticastDelegateBase.h:254
TMulticastDelegate<void __cdecl(float),FDefaultDelegateUserPolicy>::Broadcast(float) DelegateSignatureImpl.inl:956
UWorld::Tick(ELevelTick,float) LevelTick.cpp:1354
UEditorEngine::Tick(float,bool) EditorEngine.cpp:1922
UUnrealEdEngine::Tick(float,bool) UnrealEdEngine.cpp:528
FEngineLoop::Tick() LaunchEngineLoop.cpp:5819

Have Comments or More Details?

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

Login to Vote

ComponentUE - Gameplay - Gameplay Ability System
Affects Versions5.25.3
Target Fix5.5
CreatedNov 3, 2023
UpdatedFeb 16, 2024