Built a road hearthlings didn’t finish it removed the road during removal got error message. Also custom building plan wouldn’t close and let me build any other buildings
Error message recieved
release-549 (x64)
std::logic_error: 'invalid reference in native get_id’
stack traceback:
[C]: ?
[C]: in function 'get_id’
radiant/modules/entities.lua:301: in function ‘get_world_grid_location’
…rth/services/server/build/scaffolding_builder_2d.lua:186: in function ‘_create_builders’
…rth/services/server/build/scaffolding_builder_2d.lua:171: in function ‘_on_project_changed’
…rth/services/server/build/scaffolding_builder_2d.lua:129: in function <…rth/services/server/build/scaffolding_builder_2d.lua:128>
Summary:
The same engine error when trying to build one structure on top of another, then remove the lower structure.
Steps to reproduce:
Build a foundation with height=1 from slabs
Put a building from template on top of that foundation. Start constructing it. The building in now above ground level and doesn’t require a foundation pit dug up. However the building’s native foundation visually overlaps our foundation from slabs.
Pause building construction before it is finished. Select the foundation we’ve made from slabs and order to [Remove] it.
As soon as the last brick of this foundation is removed (leaving only our half-finished template building), the error shows up.
Actual Results:
The procedure in general completes successfully. The building can be finished and functions properly. However when the artificial foundation is completely removed the engine shows this error:
release-549 (x64)std::logic_error: 'invalid reference in native get_id'stack traceback: [C]: ? [C]: in function 'get_id' radiant/modules/entities.lua:301: in function 'get_world_grid_location' ...rth/services/server/build/scaffolding_builder_2d.lua:186: in function '_create_builders' ...rth/services/server/build/scaffolding_builder_2d.lua:171: in function '_on_project_changed' ...rth/services/server/build/scaffolding_builder_2d.lua:129: in function <...rth/services/server/build/scaffolding_builder_2d.lua:128>
Before. The farmhouse construction has not yet begun, foundation is completed (note that the foundation is actually two buildings since I found out it’s not big enough and expanded it later). Farmhouse template placed, starting removing foundation.
Any chance you have a template that will result in this error? You said the foundation was 2 buildings… typically, adding on to an existing building results in the 2nd building ‘merging’ with the 1st and at that point it should all be one building…
Sounds like, and I’m no coder, but it sounds like when the title is getting confused with the build. Let me try to explain…
You build a foundation, it is given a building #
Start the building process and the hearthlings go to work
Start to build the blueprint for your building
You realize the foundation isn’t what you want
You ‘BUILD OVER’ the original foundation with new foundation which is given a 2nd Building # for some strange reason but I assume because the 1st foundation was already built
You continue with the blueprint, probably while game is paused(this might be an issue)
You finish up your blueprint start the build process and unpause
Let me know how close I am…?
At this point, the game is trying to build Building #1 Which includes parts the actual structure and not just foundation. Changing the foundation results in trying to build building #1 on building#2’s foundation. I think this is the problem as the game ‘can’t’ build building #1 on a foundation for building #2.
Not 100% this is the issue but it is what it sounds like through the assertion debug
Don’t think the template is the culprit. It’s quite a simple one, nothing fancy. And of course it was created without that foundation trick first. I use this trick to prevent ground digging, so I can remove the building later without trace if I have a change of heart or town rebuilding in mind.
The foundation (both parts) is completed before I start placing the template, otherwise it won’t let me place it (template requires a flat solid surface to build upon). And usually I build temporary foundations in one clear cut. I was somewhat lazy to carefully count the size at this time.
Doing some things during the pause can have something to do with it, as I’ve noticed the error is not consistent. Sometimes it’s there, sometimes it isn’t.