Endless defend loop and crash

If your game crashes, please copy and paste the full error message below, or post a screenshot of it.

Full error message? Ok, you asked for it:


############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_battlecontroller:

Variable obj_artifact.(100026, -2147483648) not set before reading it.
at gml_Script_bc_GetEnemiesOf
############################################################################################

stack frame is
gml_Script_bc_GetEnemiesOf (line 0)
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_CreatureCast
gml_Script_bc_CreatureCastSpellGem
gml_Script_bc_OnDefend
gml_Script_bc_CreatureDefend
gml_Script_bc_Turn
gml_Object_obj_battlecontroller_Step_0

Please describe in as much detail as possible how to reproduce the bug or crash.

Be a Sorcery mage with the Spell Mastery perk. Equip a Cerberus Gatewatcher with a spell gem of Guardian Force. Enter a battle and defend. This causes the cerberus to cast the spell, which causes it to defend, which causes it to cast the spell… The game crashes instantly though - no animations are played.

What operating system are you playing the game on? Windows, Mac OS, Android, iOS, or Playstation?
If it’s Playstation, please also state your region (NA or EU). If it’s a mobile device, please state the device’s model/brand (such as Nexus 5 or Samsung Galaxy Tab 4).

Windows 10

What game version are you playing? You can find the version number on the title screen in the lower left corner.

Steam version 1.1.1
I’ve had this problem for a while now, though.

Fixed in the next patch - thanks!