Why am I getting exception 0x80000003 when iterating over a set?

Guy_Paddock
Sat, 06 Nov 2021 21:24:51 +0000
C++

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?

3 posts - 2 participants