calmackenzie / VG1819

Final Project for CS4830 2018 - 2019
0 stars 2 forks source link

[Crash] Game crash from Vampiric Protection (Monument Status Ability) #467

Closed calmackenzie closed 5 years ago

calmackenzie commented 5 years ago

Chain of events:

  1. Used Lord's Order on Evil Fiend
  2. Used Monument's ability on Evil Fiend
  3. crash

Screenshot of frame of crash: image

image image image

calmackenzie commented 5 years ago

Issue also occurred on turn end of another ancient's unit that did not have Lord's Order on it

SRJYC commented 5 years ago

I think I got the problem. Vampiric_Curse will steal hp from attached unit and restore same amount hp to caster. But caster can be died, which leaves m_caster to be random pointer.

Lords order is same, but its owner is commander. If commander dies, game ends, so it won't trigger exception.

And m_caster doesn't initialize as nullptr