I have code that looks like this:
for (const FName& ActiveGroup : this->ActivatedWeightGroups)
{
if (StartingWeightGroup.LexicalLess(ActiveGroup) && this->DeactivatePassiveGameplayEffects(ActiveGroup))
{
DeactivatedGroups.Add(ActiveGroup);
this->ActivatedWeightGroups.Remove(ActiveGroup);
}
}
For some reason, every time I run this code I get a very cryptic exception (0x80000003) in the debugger on the for
line. Why? What causes this?