# Engine Error when making 2nd story bulding

**URL:** <https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108>\
**Category:** Other Reports\
**Tags:** no\_longer\_applicable\
**Created:** [January 13, 2016, 7:21am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108 "2016-01-13T07:21:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BeansOhBeans](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@BeansOhBeans](https://discourse.stonehearth.net/u/BeansOhBeans)\
**Post date:** [January 13, 2016, 7:21am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/1 "2016-01-13T07:21:42Z")

</div>

I’m building a new design atm. I put walls up, then a floor ontop of them, then when I added walls to the second story of my building the engine crashed with this report:

```auto
release-491 (x64)
stonehearth/components/wall/wall_component.luac:106: attempt to index a nil value
stack traceback:
	[C]: ?
	stonehearth/components/wall/wall_component.luac:106: in function 'connect_to_columns'
	stonehearth/services/server/build/build_service.luac:234: in function 'init_fn'
	stonehearth/services/server/build/build_service.luac:123: in function '_create_blueprint'
	stonehearth/services/server/build/build_service.luac:234: in function '_create_wall'
	stonehearth/services/server/build/build_service.luac:232: 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>

```

```auto
release-491 (x64)
c++ exception: lua runtime error
stack traceback:

```

This happened right as I made the walls on the 2nd floor.

---

<div class="post-metadata">

**Author:** ![BeansOhBeans](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@BeansOhBeans](https://discourse.stonehearth.net/u/BeansOhBeans)\
**Post date:** [January 13, 2016, 7:40am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/2 "2016-01-13T07:40:38Z")

</div>

Also I can’t place furniture on the second floor.

The game has stabalised now, and making a 2 story house seems fine with it. Maybe just a normal crash?

---

<div class="post-metadata">

**Author:** ![Powerclank](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/powerclank/32/48934_2.png) [@Powerclank](https://discourse.stonehearth.net/u/Powerclank)\
**Post date:** [January 13, 2016, 10:14am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/3 "2016-01-13T10:14:59Z")

</div>

There are still a few bugs inside the construction mode, especially when building a second floor.  
If you search for a building error on this forum, you’ll see all the problems and tips 😉

---

<div class="post-metadata">

**Author:** ![VulkanNo1](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@VulkanNo1](https://discourse.stonehearth.net/u/VulkanNo1)\
**Post date:** [January 27, 2016, 1:38am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/4 "2016-01-27T01:38:41Z")

</div>

I had a simular probelm. I created a normal floor with some blank walls, I then added the second floor takinging out a 5x5 square from one cornor, i added the walls back onto the floor to keep the walls going around the entire out side, however when i added the secondary floor walls this error came up.

```auto
release-491 (x64)
stonehearth/components/wall/wall_component.luac:106: attempt to index a nil value
stack traceback: [C]: ? stonehearth/components/wall/wall_component.luac:106: in function 'connect_to_columns' 
stonehearth/services/server/build/build_service.luac:234: in function 'init_fn'
stonehearth/services/server/build/build_service.luac:123: in function '_create_blueprint'
stonehearth/services/server/build/build_service.luac:234: in function '_create_wall'
stonehearth/services/server/build/build_service.luac:232: 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>

```

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Smuggy](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/smuggy/32/25956_2.png) [@Smuggy](https://discourse.stonehearth.net/u/Smuggy)\
**Post date:** [February 3, 2016, 10:37pm UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/5 "2016-02-03T22:37:33Z")

</div>

I got hit with 4 errors all together while trying something abit more elaborate.

In order;

```auto
release-491 (x64)
...nehearth/components/building/building_component.luac:138: attempt to call method 'layout' (a nil value)
stack traceback:
	[C]: in function 'layout'
	...nehearth/components/building/building_component.luac:138: in function 'layout_roof'
	stonehearth/services/server/build/build_service.luac:219: in function 'grow_roof'
	stonehearth/services/server/build/build_service.luac:210: in function 'cb'
	stonehearth/services/server/build/build_service.luac:304: in function 'do_command'
	stonehearth/services/server/build/build_service.luac:210: in function <stonehearth/services/server/build/build_service.luac:209>

```

```auto
release-491 (x64)
c++ exception: lua runtime error
stack traceback:

```

```auto
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:210: in function <stonehearth/services/server/build/build_service.luac:209>

```

```auto
release-491 (x64)
...hearth/services/server/build/build_undo_manager.luac:108: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	...hearth/services/server/build/build_undo_manager.luac:108: in function 'clear'
	stonehearth/services/server/build/build_service.luac:44: in function 'set_teardown'
	stonehearth/call_handlers/build_call_handler.luac:7: in function <stonehearth/call_handlers/build_call_handler.luac:6>

```

Building : [Imgur: The magic of the Internet](http://imgur.com/gAa1fFC)

Errors appeared when i tried to put the 2nd roof on. After that all building functions stop working and i have to relog to fix it but when i load back into my save i get the error message;

```auto
release-491 (x64)
...nehearth/components/building/building_component.luac:124: attempt to index local 'entity' (a nil value)
stack traceback:
	radiant/modules/events.luac:84: in function <radiant/modules/events.luac:81>
	...nehearth/components/building/building_component.luac:124: in function '_trace_entity'
	...nehearth/components/building/building_component.luac:37: in function '_restore_structure_traces'
	...nehearth/components/building/building_component.luac:17: 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 <radiant/modules/events.luac:86>

```

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/jomaxro/32/47935_2.png) [@jomaxro](https://discourse.stonehearth.net/u/jomaxro)\
**Post date:** [February 4, 2016, 2:05am UTC](https://discourse.stonehearth.net/t/engine-error-when-making-2nd-story-bulding/19108/6 "2016-02-04T02:05:39Z")

</div>

Hey there @Smuggy, welcome to the Discourse! Are you able to save your building as a template? If so, can you upload it to the thread I have linked below (instructions at the link):

[http://discourse.stonehearth.net/t/the-buildings-my-hearthling-will-not-build-thread/14704/45?u=jomaxro](http://discourse.stonehearth.net/t/the-buildings-my-hearthling-will-not-build-thread/14704/45?u=jomaxro)
