Attempt to index a nil value - in function 'update_auto_destroy_trace'

when building a second level with a hole in second floor it gets engine error these are the errors I get

release-491 (x64)
...fixture_fabricator/fixture_fabricator_component.luac:158: attempt to index a nil value
stack traceback:
	[C]: ?
	...fixture_fabricator/fixture_fabricator_component.luac:158: in function '_update_auto_destroy_trace'
	...fixture_fabricator/fixture_fabricator_component.luac:154: in function '_set_finished'
	...fixture_fabricator/fixture_fabricator_component.luac:28: in function 'set_teardown'
	...uction_progress/construction_progress_component.luac:43: in function 'set_teardown'
	stonehearth/services/server/build/build_service.luac:46: in function 'cb'
	stonehearth/services/server/build/build_service.luac:34: in function '_call_all_children'
	stonehearth/services/server/build/build_service.luac:31: in function '_call_all_children'
	stonehearth/services/server/build/build_service.luac:31: in function '_call_all_children'
	stonehearth/services/server/build/build_service.luac:45: in function 'set_teardown'
	stonehearth/call_handlers/build_call_handler.luac:7: in function <stonehearth/call_handlers/build_call_handler.luac:6>
release-491 (x64)
c++ exception: lua runtime error
stack traceback:
release-491 (x64)
std::logic_error: 'invalid reference in native get_id'
stack traceback:
	radiant/modules/events.luac:84: in function <radiant/modules/events.luac:81>
	[C]: in function 'get_id'
	radiant/modules/entities.luac:105: in function 'get_world_grid_location'
	stonehearth/lib/build_util.luac:394: in function 'clip_dependant_regions_from_recursive'
	stonehearth/lib/build_util.luac:403: in function 'clip_dependant_regions_from'
	...th/services/server/build/scaffolding_builder_1d.luac:137: in function '_cover_project_region'
	...th/services/server/build/scaffolding_builder_1d.luac:100: in function '_update_scaffolding_size'
	...th/services/server/build/scaffolding_builder_1d.luac:54: in function 'set_teardown'
	...arth/components/fabricator/fabricator_component.luac:231: in function '_start_project'
	...arth/components/fabricator/fabricator_component.luac:139: in function '_updates_state'
	...arth/components/fabricator/fabricator_component.luac:135: in function 'obj'
	radiant/modules/events.luac:44: in function 'instance'
	radiant/modules/events.luac:98: in function <radiant/modules/events.luac:96>
	[C]: in function 'xpcall'
	radiant/modules/events.luac:96: in function 'trigger'
	radiant/modules/events.luac:121: in function '_trigger_gameloop'
	radiant/modules/events.luac:150: in function '_update'
	radiant/server.luac:19: in function <radiant/server.luac:17>
release-491 (x64)
stonehearth/services/server/build/build_service.luac:222: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	stonehearth/services/server/build/build_service.luac:222: in function '_get_blueprint_at_point'
	stonehearth/services/server/build/build_service.luac:225: in function '_fetch_blueprint_at_point'
	stonehearth/services/server/build/build_service.luac:230: in function '_fetch_column_at_point'
	stonehearth/services/server/build/build_service.luac:231: in function '_add_wall_span'
	stonehearth/services/server/build/build_service.luac:199: in function 'visitor_fn'
	stonehearth/lib/build_util.luac:270: in function 'grow_walls_around'
	stonehearth/services/server/build/build_service.luac:199: in function 'grow_walls'
	stonehearth/services/server/build/build_service.luac:189: in function 'cb'
	stonehearth/services/server/build/build_service.luac:304: in function 'do_command'
	stonehearth/services/server/build/build_service.luac:189: in function <stonehearth/services/server/build/build_service.luac:188>
release-491 (x64)
...hearth/services/server/build/build_undo_manager.luac:6: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	...hearth/services/server/build/build_undo_manager.luac:6: in function 'begin_transaction'
	stonehearth/services/server/build/build_service.luac:303: in function 'do_command'
	stonehearth/services/server/build/build_service.luac:50: in function <stonehearth/services/server/build/build_service.luac:49>

Hey there @laleman87, welcome to the Discourse! Thanks for the report.

1 Like

Do you have a picture of your house, by any chance, or a template of it?

your welcome and now I dont have but I seen a picture on here that someone posted with same bug where building second level makes the error and two of the sides of second walls are missing, I will try to get a picture of it next time since it happens when ever I build second floor with a hole in the floor

Summary:
After people stopped building a room, I ordered them to remove it, then I got an huge error.
Steps to reproduce:

  1. build a room
  2. wait for the workers to stop working on it (not finished)
  3. try to remove the room

Expected Results:
room removed or actually build
Actual Results:
Errorlog:

release-519 (x64)
.../fixture_fabricator/fixture_fabricator_component.lua:458: attempt to index a nil value
stack traceback:
	[C]: ?
	.../fixture_fabricator/fixture_fabricator_component.lua:458: in function '_update_auto_destroy_trace'
	.../fixture_fabricator/fixture_fabricator_component.lua:440: in function '_set_finished'
	.../fixture_fabricator/fixture_fabricator_component.lua:79: in function 'set_teardown'
	...ruction_progress/construction_progress_component.lua:97: in function 'set_teardown'
	stonehearth/services/server/build/build_service.lua:112: in function 'cb'
	stonehearth/services/server/build/build_service.lua:81: in function '_call_all_children'
	stonehearth/services/server/build/build_service.lua:77: in function '_call_all_children'
	stonehearth/services/server/build/build_service.lua:77: in function '_call_all_children'
	stonehearth/services/server/build/build_service.lua:109: in function 'set_teardown'
	stonehearth/call_handlers/build_call_handler.lua:25: in function <stonehearth/call_handlers/build_call_handler.lua:23>

Notes:

Attachments:

Version Number and Mods in use:
release-519 no mods
System Information:
Intel i7 5775
Geforece 970gtx Evga ftw+
16gb Kingston DDR3 Ram
Samsung Evo 840 SSD

Hey @SVHelios, do you have the save game where this error occurs? If so, can you upload it for the devs to review?

To upload a save, locate the folder in C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install), zip the individual save’s folder (not the entire saved_games folder), and upload it. If the *.zip is less than 10 MB, feel free to upload it directly to the Discourse. If larger, please upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

With pleasure:
1455136791243.zip (8.5 MB)
I didn’t bother renaming the folder but you shouldn’t have problems with that ^^

However I have to say, that this is a modified version of a building not building because I kinda dirty-fixed the topic by deleting everything and replacing the order.

@jomaxro
im not sure if any of the mods or anyone from TR are aware but if you rename the folder it seems to mess things up. it will not load a game if you change the name of the folder from the numbers

Well, good thing I didn’t xD
Sometimes it pays off being lazy

1 Like

Interesting…it didn’t do that before. Might be related to @yshan’s changes to allow saves to be renamed. Here is the UI error I received. I was able to load this save, however, without issue.

release-523 (x64)
Uncaught Error: Syntax error, unrecognized expression: [key=Test Save]
Error: Syntax error, unrecognized expression: [key=Test Save]
    at Function.Sizzle.error (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:1850:8)
    at tokenize (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:2460:11)
    at Function.Sizzle (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:1255:14)
    at jQuery.fn.extend.find (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:5730:11)
    at jQuery.fn.jQuery.init (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:202:40)
    at jQuery (http://radiant/stonehearth/ui/root/js/libs/jquery-1.10.2.js:63:10)
    at Object.merge.$ (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.js:41073:22)
    at CoreView.extend.$ (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.js:42540:34)
    at null.<anonymous> (http://radiant/stonehearth/ui/game/save_view/save_view.js:289:18)
    at DeferredActionQueues.invoke (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.js:679:18)

strange I tried 2 different times. I was renaming them to send them in so I knew what ones to pull and I could not load them again after I renamed them. mabey because of what I renamed them to?>

1 Like