Attempt to index field '_storage_component' (a nil value) - in function 'report_traceback'

Summary:
error on crafting

Notes:

develop-2860 (x64)
stonehearth/components/crafter/crafter_component.lua:165: attempt to index field '_storage_component' (a nil value)
stack traceback:
	radiant/modules/common.lua:223: in function 'report_traceback'
	radiant/modules/common.lua:234: in function <radiant/modules/common.lua:228>
	stonehearth/components/crafter/crafter_component.lua:165: in function 'remove_crafting_item'
	...rver/town/orchestrators/craft_items_orchestrator.lua:97: in function 'instance'
	radiant/modules/events.lua:206: in function <radiant/modules/events.lua:200>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	radiant/modules/events.lua:200: in function 'trigger'
	stonehearth/components/ai/ai_component.lua:544: in function <stonehearth/components/ai/ai_component.lua:520>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:243: in function 'xpcall'
	stonehearth/components/ai/ai_component.lua:520: 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:
dev2860

Hey there @NebRa, welcome to the Discourse! Do you have any details on what you were doing when this occurred?

early in game (9 peeps), 1x carpenter 2x farmer.
reloaded a few times, error doesn’t repeat at same time-stamp, so my guess is one of farmer level up.
As i dont alter the carpenters job que, there is timber available & carpenter set to only do “job” (i uncheck “haul” and “build” on carpenter until after first 2 buildings completed)

1 Like

I have the same error with a trade completion of 7 bird baths for two iron mails. Here is the screenshot

Do you happen to have the save file?

I do but I wont be able to upload it until tuesday or wednesday

Here is the save game file. Dont mind the name. Changed it before uploading but kept the old name.
1459957934512 stonehearth save appendchild of undefined.zip (9.6 MB)

Same error, occured the moment the Goblin stomped back into town.
Guess it was checking to see if i had the required items.

Want the save file?

develop-2924 (x64)
stonehearth/components/crafter/crafter_component.lua:166: attempt to index field ‘_storage_component’ (a nil value)
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
stonehearth/components/crafter/crafter_component.lua:166: in function ‘remove_crafting_item’
…rver/town/orchestrators/craft_items_orchestrator.lua:97: in function 'instance’
radiant/modules/events.lua:206: in function <radiant/modules/events.lua:200>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:200: in function 'trigger’
stonehearth/components/ai/ai_component.lua:548: in function <stonehearth/components/ai/ai_component.lua:524>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: 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:257: 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>

@NebRa, do you have the save file where this bug occurs? If so, can you please upload it?

Re loaded save file a few times:
No longer get error on client reload (F5)
And was unable to reproduce error (4 request from stompy Goblin completed).

uploading anyhow.

1 Like

save.zip (8.3 MB)

1 Like

Hi!
Did a crafter die by any chance?
Thanks
-Yang

1 Like

I have one gravestone, from the first attack. ~day 4
The saves a while after that, (day 14) when I first got the bug.
Spent another few hours trying to replicate, no joy.

Well I’m checking in a fix for this error. I suspect it has something to do with the crafter dying XD
Thanks for reporting it!
-Yang

Just a thought… It could be a crafter that was demoted / changed role.

I usually make 3 farmers initially, to get fields sown asap.
I then make one of them into my Trapper, or 1st Footman.