Lua NPE chain when building while Ogo and Phoenix Crypt present

Summary
During Ogo attack story lead in with Phoenix Crypt also present on map, custom design changes resulted in multiple Lua operations on nil values. These were not fatal and saved anyway, however engine errors (see below) were thrown. Once Ogo and Phoenix are cleared from map, NPE’s do not reoccur. NPE’s also do not occur when only Phoenix Crypt is present.

Steps to reproduce:

  1. Wait for Ogo attack story lead in to trigger
  2. Wait for Phoenix Crypt to spawn (Ogo story must still be in process)
  3. Perform custom building design

Expected Results:
Custom design works and saves as expected

Actual Results:
Lua nil value operation errors are thrown, however basic operations seem to proceed anyway

Notes:
Save can be provided upon request

Attachments:
Attachment not allowed due to new user status. Engine errors are as follows (4 included):
Error 1:

release-610 (x64)
…ervices/client/build_editor/build_editor_service.lua:145: attempt to index a nil value
stack traceback:
[C]: ?
…ervices/client/build_editor/build_editor_service.lua:145: in function ‘_on_mouse_event’
…ervices/client/build_editor/build_editor_service.lua:60: in function '_mouse_cb’
stonehearth/services/client/input/input_capture.lua:49: in function '_dispatch’
stonehearth/services/client/input/input_service.lua:55: in function '_dispatch_input’
stonehearth/services/client/input/input_service.lua:12: in function <stonehearth/services/client/input/input_service.lua:11>

Error 2

release-610 (x64)
std::logic_error: 'invalid reference in native get_id’
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
[C]: in function ‘get_id’
…onehearth/components/building/building_component.lua:1830: in function ‘_compute_fixture_dependencies’
…onehearth/components/building/building_component.lua:441: in function ‘_finish_set_building_active’
…onehearth/components/building/building_component.lua:1508: in function ‘_compute_scaffolding_worker’
…onehearth/components/building/building_component.lua:1429: in function 'fn’
radiant/controllers/nonpersistent_timer.lua:56: in function 'fire’
radiant/controllers/time_tracker_controller.lua:82: in function <radiant/controllers/time_tracker_controller.lua:82>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/controllers/time_tracker_controller.lua:82: in function 'set_now’
radiant/controllers/time_tracker_controller.lua:103: in function 'increment_now’
radiant/modules/timer.lua:13: in function 'instance’
radiant/modules/events.lua:227: in function <radiant/modules/events.lua:221>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:221: in function 'trigger’
radiant/modules/events.lua:290: in function '_trigger_gameloop’
radiant/modules/events.lua:338: in function '_update’
radiant/server.lua:62: in function <radiant/server.lua:58>

Error 3

release-610 (x64)
…hearth/components/scaffolding/scaffolding_region.lua:1163: assertion failed!
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
[C]: in function ‘assert’
…hearth/components/scaffolding/scaffolding_region.lua:1163: in function ‘precompute’
…/components/scaffolding/scaffolding_project_flat.lua:108: in function ‘precompute_scaffolding’
…earth/components/scaffolding/scaffolding_project.lua:120: in function ‘precompute_scaffolding’
…onehearth/components/building/building_component.lua:1470: in function ‘_compute_scaffolding_worker’
…onehearth/components/building/building_component.lua:1429: in function 'fn’
radiant/controllers/nonpersistent_timer.lua:56: in function 'fire’
radiant/controllers/time_tracker_controller.lua:82: in function <radiant/controllers/time_tracker_controller.lua:82>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/controllers/time_tracker_controller.lua:82: in function 'set_now’
radiant/controllers/time_tracker_controller.lua:103: in function 'increment_now’
radiant/modules/timer.lua:13: in function 'instance’
radiant/modules/events.lua:227: in function <radiant/modules/events.lua:221>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:221: in function 'trigger’
radiant/modules/events.lua:290: in function '_trigger_gameloop’
radiant/modules/events.lua:338: in function '_update’
radiant/server.lua:62: in function <radiant/server.lua:58>

Error 4

release-610 (x64)
…/fixture_fabricator/fixture_fabricator_component.lua:173: attempt to index local ‘bc’ (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>
…/fixture_fabricator/fixture_fabricator_component.lua:173: in function ‘_are_dependencies_satisfied’
…/fixture_fabricator/fixture_fabricator_component.lua:215: in function ‘_start_project’
…/fixture_fabricator/fixture_fabricator_component.lua:84: in function ‘set_active’
…ruction_progress/construction_progress_component.lua:81: in function ‘set_active’
…onehearth/components/building/building_component.lua:430: in function ‘cb’
…onehearth/components/building/building_component.lua:383: in function ‘_call_all_children’
…onehearth/components/building/building_component.lua:379: in function ‘_call_all_children’
…onehearth/components/building/building_component.lua:379: in function ‘_call_all_children’
…onehearth/components/building/building_component.lua:427: in function ‘_set_structures_active’

radiant/controllers/time_tracker_controller.lua:82: in function 'set_now’
radiant/controllers/time_tracker_controller.lua:103: in function 'increment_now’
radiant/modules/timer.lua:13: in function 'instance’
radiant/modules/events.lua:227: in function <radiant/modules/events.lua:221>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:221: in function 'trigger’
radiant/modules/events.lua:290: in function '_trigger_gameloop’
radiant/modules/events.lua:338: in function '_update’
radiant/server.lua:62: in function <radiant/server.lua:58>

Version Number and Mods in use:
No mods in use. Release-610 (x64)

System Information:
N/A

Where you building something while this happened ? Just interesting for me that there is something about a building in every error.
Could you add a save file, it will help them a lot.

I can’t attach the save file yet due to the new user attachment restriction, they’ll have to give me an email address to send it to for now. I’ll check it over the next day or two and see if it opens up to let me attach it.
I’ve seen a few build assertion errors on custom designs as well, however they seem to be more random so far and are not consistently reproducible so I haven’t ticketed them. This nil value exception though is much more specific and they should be able to track it down to the exact variable through the stack trace I provided.