FActiveGameplayCueContainer::RemoveCue can crash while iterating removals

I’m experiencing a crash in FActiveGameplayCueContainer::RemoveCue. It is possibly the same root cause as [Content removed] - however, there is not a linked issue or one that I’m able to find by searching the issue tracker

Can you confirm that this is already being tracked and provide a ticket for me to follow? My repro steps are below in case that’s helpful.

EDIT: I found https://issues.unrealengine.com/issue/UE-221997, which is involved in the repro I laid out. Just preventing extraneous removals wouldn’t fix this case, however.

Steps to Reproduce

  1. Set up an effect with a duration and gameplay cue X
  2. Set up an effect that grants tag Y and gameplay cue Z
  3. Set up an effect with a duration, requires tag Z component, and gameplay cue X
  4. Apply all 3 effects to a target in the order I specified
  5. Remove all effects that grant tag Y. When cue Z sends the removal event, the effect that requires tag Z will remove its cue and also the cue granted by the first effect
  6. The removal of cue Z will now be out of range.

EDIT: This repro requires mixed (or possibly minimal) replication mode on the ability system component

Hi there,

Unfortunately I have been unable to reproduce the issue that you describe using the provided steps to reproduce. Are you able to please provide a minimal example project that reliably reproduces the issue and attach it to this case.

Kind Regards

Hi there,

Thank you for providing the project files. I have successfully verified the results that you have reported and have sent a bug report to Epic. You can track progress on the bug here when it becomes publicly available.

Many Thanks

Sure. The missing step is flip the ability system component to mixed replication mode. I’ve attached a repro built on the 3rd person sample project. Just hit play. The character begin play is where I hooked up the crash in BP.