Attempt to index local 'entry' (a nil value) - in function '_check_for_target'

Summary:

So I was testing this bug (fixed, BTW), and after confirming so decided I wanted to have some fun so I made 18 fully armored footman and sent them to attack the Goblin camp. I ended up causing 5 engine errors, and created an immortal Goblin.

Steps to reproduce:

  1. Unsure, not able to reproduce yet…

Expected Results:

Goblins are quickly and painlessly eliminated.

Actual Results:

Multiple engine errors and immortal goblin.

Attachments:

release-549 (x64)
stonehearth/ai/observers/find_target_observer.lua:284: attempt to index local 'entry' (a nil value)
stack traceback:
	stonehearth/ai/observers/find_target_observer.lua:284: in function '_check_for_target'
	stonehearth/ai/observers/find_target_observer.lua:327: in function 'cb'
	stonehearth/services/server/tasks/task.lua:76: in function '_fire_cbs'
	stonehearth/services/server/tasks/task.lua:447: in function '__action_stopped'
	...tonehearth/services/server/tasks/run_task_action.lua:151: in function <...tonehearth/services/server/tasks/run_task_action.lua:147>
	[C]: ?
	[C]: ?
	[C]: in function 'stop'
	stonehearth/components/ai/ai_component.lua:580: in function <stonehearth/components/ai/ai_component.lua:524>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:524: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
release-549 (x64)
start thinking called from non-stopped state "finished"
stack traceback:
	[C]: ?
	[C]: in function 'run'
	stonehearth/components/ai/ai_component.lua:540: in function <stonehearth/components/ai/ai_component.lua:524>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:524: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
release-549 (x64)
(546753 Govi the Horrendous) (stonehearth:top) bad frame transition to "stop" from "starting_thinking"
stack traceback:
	[C]: ?
	[C]: in function 'stop'
	stonehearth/components/ai/ai_component.lua:580: in function <stonehearth/components/ai/ai_component.lua:524>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:524: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
release-549 (x64)
invalid initial state "starting_thinking" in run
stack traceback:
	[C]: ?
	[C]: in function 'run'
	stonehearth/components/ai/ai_component.lua:540: in function <stonehearth/components/ai/ai_component.lua:524>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:524: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>
release-549 (x64)
@stonehearth/components/ai/ai_component.lua:566: (546753 Govi the Horrendous) has not yielded after 10 ai spins. Are they in a bad state? Last abort reason: Target out of melee range
stack traceback:
	radiant/modules/common.lua:223: in function 'report_traceback'
	radiant/modules/common.lua:442: in function 'verify'
	stonehearth/components/ai/ai_component.lua:566: in function <stonehearth/components/ai/ai_component.lua:524>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:524: in function '_thread_main'
	stonehearth/services/server/threads/thread.lua:249: in function <stonehearth/services/server/threads/thread.lua:246>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/services/server/threads/thread.lua:246: in function 'f'
	radiant/lib/env.lua:15: in function <radiant/lib/env.lua:14>

Version Number and Mods in use:

Alpha 15, release 549 with debug tools

System Information:

Windows 10 Pro 64 | Intel Core i5-3360M | 16 GB system memory | Nvidia NVS 5400m