CBehaviorAttackModifier can crash the game

Sometimes - perhaps 1/20 of the time on average - the game will crash when an attack modified by an attack modifier behavior impacts its target. At first, I wondered if this was happening due to something else happening as a result of the attack modifier, but it still happens even if the attack modifier isn’t doing anything. You can reproduce this bug by doing the following:

  1. Create a map with the Void Multi dependency.
  2. Create a new Attack Modifier behavior and set the Chance field to 1, and don’t change anything else.
  3. Add the behavior to the Marauder, and check the Impact flag on the Marauder’s Punisher Grenades Damage effect.
  4. Spawn a bunch of Marauders under your control and have them attack enemy units for a while - eventually a crash should occur. If all the attacks are synced up, you can see that the crash happens right as the missiles are impacting their target.

The bug also occurred when I tried the same process with the Hydralisk, but it did not occur when I tried it with the Reaper. This makes me think it only happens with weapons that fire a missile.