# Construction\_data\_component engine error

**URL:** <https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988>\
**Category:** Resolved Reports\
**Tags:** resolved\
**Created:** [October 8, 2015, 6:08am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988 "2015-10-08T06:08:38Z")\
**Posts on this page:** 18\
**Page:** 1

<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:** [October 8, 2015, 6:08am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/1 "2015-10-08T06:08:38Z")

</div>

**Summary:** Received engine error when loading previous save. Game appears to function normally despite this.

**Steps to reproduce:** Unknown, error appeared on save load, will upload save.

**Expected Results:** Save loads without errors appearing.

**Actual Results:** Error appears on load of save.

**Notes:**  
Error #1:

```
develop-2630 (x64)
...s/construction_data/construction_data_component.luac:97: attempt to index field 'entity' (a nil value)
stack traceback:
	[C]: ?
	...s/construction_data/construction_data_component.luac:97: in function 'set_contributes_to_score'
	...s/construction_data/construction_data_component.luac:16: in function <...s/construction_data/construction_data_component.luac:15>

```

Error #2:

```
develop-2630 (x64)
c++ exception: lua runtime error
stack traceback:

```

**Attachments:**  
[Stonehearth.log](https://www.dropbox.com/s/9yw1il9ovteblus/stonehearth.log?dl=0)  
[Save folder](https://www.dropbox.com/sh/wfq51jc52oicgig/AADXuNlsxEOcq3IeY3HWwzgRa?dl=0)

**Version and Mods:** develop-2630 with debug tools installed

**System Information:** Windows 10 Pro 64 | Intel Core i5-3360M | 16 GB system memory | Nvidia NVS 5400m

Edit 1: Note sure if this is useful or just a function of the f5 ui refresh command, but when I hit f5 after playing a bit, the two errors reappeared.

---

<div class="post-metadata">

**Author:** ![Albert](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/albert/32/45599_2.png) [@Albert](https://discourse.stonehearth.net/u/Albert)\
**Post date:** [October 8, 2015, 9:11am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/2 "2015-10-08T09:11:25Z")

</div>

Thanks! The save helps a lot. There are some bigger issues here, so this fix will take a little longer.

---

<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:** [October 8, 2015, 9:14am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/3 "2015-10-08T09:14:26Z")

</div>

> [@Albert](#):
>
> Thanks! The save helps a lot.

No, thank you! I really appreciate how much effort you (and everyone at TR) put into fixing all of these bugs.

> [@Albert](#):
>
> There are some bigger issues here

If you don’t mind, I am very curious what the “bigger issues” are? Also, I submitted a separate bug report for this, but if you look at the [Overly Excited Sheep](http://discourse.stonehearth.net/t/dev-2630-overly-excited-sheep/16992) thread this is the same save…

---

<div class="post-metadata">

**Author:** ![SteveAdamo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/steveadamo/32/13955_2.png) [@SteveAdamo](https://discourse.stonehearth.net/u/SteveAdamo)\
**Post date:** [October 8, 2015, 12:33pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/4 "2015-10-08T12:33:09Z")

</div>

thanks for the detailed report @jomaxro, and for helping out in general in the bug reports section… definitely appreciated! 👍

---

<div class="post-metadata">

**Author:** ![Cucaniensis](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Cucaniensis](https://discourse.stonehearth.net/u/Cucaniensis)\
**Post date:** [October 8, 2015, 2:14pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/5 "2015-10-08T14:14:49Z")

</div>

Seeing the same two errors when I reload a save, and two additional ones. Similarily the game appears to just function normaly despite the bugs and similarily they all appear whenever the ui is refreshed.

Should I make a new thread for the other two bugs or is it okay if I post them here?

---

<div class="post-metadata">

**Author:** ![8BitCrab](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/8bitcrab/32/48512_2.png) [@8BitCrab](https://discourse.stonehearth.net/u/8BitCrab)\
**Post date:** [October 8, 2015, 3:47pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/6 "2015-10-08T15:47:20Z")

</div>

> [@Cucaniensis](#):
>
> Should I make a new thread for the other two bugs or is it okay if I post them here?

its best to just post em here, saves us from clutter. 😉

---

<div class="post-metadata">

**Author:** ![Cucaniensis](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Cucaniensis](https://discourse.stonehearth.net/u/Cucaniensis)\
**Post date:** [October 8, 2015, 4:16pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/7 "2015-10-08T16:16:30Z")

</div>

Here they are

**Additional error #1:**  
develop-2630 (x64)  
…earth/services/server/build/scaffolding\_manager.luac:48: attempt to index field ‘fabricator’ (a nil value)  
stack traceback:  
[C]: ?  
…earth/services/server/build/scaffolding\_manager.luac:48: in function ‘\_trace\_project\_region’  
…earth/services/server/build/scaffolding\_manager.luac:13: in function \<…earth/services/server/build/scaffolding\_manager.luac:10\>

**Additional error #2:**  
develop-2630 (x64)  
stonehearth/ai/lib/follow\_path.luac:41: Path is not contiguous for (49202118 Runa Pounder)  
stack traceback:  
[C]: in function 'assert’  
stonehearth/ai/lib/follow\_path.luac:41: in function '\_initialize\_path’  
stonehearth/ai/lib/follow\_path.luac:4: in function '\_\_user\_init’  
radiant/lib/unclasslib.luac:61: in function '\_\_init’  
radiant/lib/unclasslib.luac:38: in function 'FollowPath’  
stonehearth/ai/actions/follow\_path\_action.luac:26: in function \<stonehearth/ai/actions/follow\_path\_action.luac:7\>  
[C]: ?  
[C]: ?  
[C]: in function 'run’  
stonehearth/services/server/ai/compound\_action.luac:133: in function \<stonehearth/services/server/ai/compound\_action.luac:129\>  
[C]: ?  
…  
[C]: in function 'run’  
stonehearth/services/server/ai/compound\_action.luac:133: in function \<stonehearth/services/server/ai/compound\_action.luac:129\>  
[C]: ?  
[C]: ?  
[C]: in function 'run’  
stonehearth/components/ai/ai\_component.luac:177: in function '\_thread\_main’  
stonehearth/services/server/threads/thread.luac:90: in function \<stonehearth/services/server/threads/thread.luac:89\>  
[C]: in function 'xpcall’  
stonehearth/services/server/threads/thread.luac:89: in function 'f’  
radiant/lib/env.luac:8: in function \<radiant/lib/env.luac:8\>

The hearthling named in the second additional bug will change, and occasionally there will be several of the same bug, with diffrent hearthlings upon loading up the game.

**Attachment** :  
[Save folder](https://www.dropbox.com/sh/q6drsy7gqs32bp7/AAAtXYVVIfg11KkeEqVVYHQpa?dl=0)

**Version and Mods** : develop-2630 + debug tools

---

<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:** [October 8, 2015, 4:38pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/8 "2015-10-08T16:38:08Z")

</div>

> [@Cucaniensis](#):
>
> Additional error #2:develop-2630 (x64)stonehearth/ai/lib/follow\_path.luac:41: Path is not contiguous for (49202118 Runa Pounder)

Paging @8BitCrab, I believe that error #2 posted above belongs in [this thread](http://discourse.stonehearth.net/t/ack-2628-follow-path-error/16965/12), where the issue has already been acknowledged.

---

<div class="post-metadata">

**Author:** ![Albert](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/albert/32/45599_2.png) [@Albert](https://discourse.stonehearth.net/u/Albert)\
**Post date:** [October 8, 2015, 6:09pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/9 "2015-10-08T18:09:31Z")

</div>

> [@jomaxro](#):
>
> If you don’t mind, I am very curious what the “bigger issues” are? Also, I submitted a separate bug report for this, but if you look at the [Overly Excited Sheep](http://discourse.stonehearth.net/t/dev-2630-overly-excited-sheep/16992) thread this is the same save…

We have a more general problem of race conditions initializing datastores on load because we’re halfway in converting a bunch of objects to use a new API. I did fix this particular problem, but we need to address the more general problem soon.

---

<div class="post-metadata">

**Author:** ![MichaelTraveler](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/michaeltraveler/32/48237_2.png) [@MichaelTraveler](https://discourse.stonehearth.net/u/MichaelTraveler)\
**Post date:** [October 14, 2015, 12:58pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/10 "2015-10-14T12:58:54Z")

</div>

happend when i tried to build some road

 ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/e/9/e964e83d966e277a4790d87cec710350dbede2f9.png)

what can i do about this one ?

---

<div class="post-metadata">

**Author:** ![Beatrice](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/beatrice/32/21134_2.png) [@Beatrice](https://discourse.stonehearth.net/u/Beatrice)\
**Post date:** [October 15, 2015, 5:12pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/11 "2015-10-15T17:12:07Z")

</div>

It seems that this more than 10000 errors is the result of saving a game without building a blue print (you do the blue print, then deselect the building manager without removing the blue print):

```
release-453 (x64)...s/construction_data/construction_data_component.luac:97: attempt to index field 'entity' (a nil value)stack traceback:
	[C]: ?
	...s/construction_data/construction_data_component.luac:97: in function 'set_contributes_to_score'
	...s/construction_data/construction_data_component.luac:16: in function <...s/construction_data/construction_data_component.luac:15>
```

---

<div class="post-metadata">

**Author:** ![HLG\_Kiwi](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/hlg_kiwi/32/22974_2.png) [@HLG\_Kiwi](https://discourse.stonehearth.net/u/HLG_Kiwi)\
**Post date:** [October 15, 2015, 4:48am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/12 "2015-10-15T04:48:59Z")

</div>

I got the same error. I first got an error for combine two blue prints together, then restarted my game so i could delete them and I got this error (sorry I don’t have the error code for the combining buildings)

release-453 (x64)  
…s/construction\_data/construction\_data\_component.luac:97: attempt to index field ‘entity’ (a nil value)  
stack traceback:  
[C]: ?  
…s/construction\_data/construction\_data\_component.luac:97: in function ‘set\_contributes\_to\_score’  
…s/construction\_data/construction\_data\_component.luac:16: in function \<…s/construction\_data/construction\_data\_component.luac:15\>

---

<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:** [October 15, 2015, 4:59am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/13 "2015-10-15T04:59:28Z")

</div>

Paging @8BitCrab, @SteveAdamo, or @Relyss, this is has been acknowledged (and possibly resolved…)

> [@Construction\_data\_component engine error](http://discourse.stonehearth.net/t/dev-2630-construction-data-component-engine-error/16988):
>
> Summary: Received engine error when loading previous save. Game appears to function normally despite this. Steps to reproduce: Unknown, error appeared on save load, will upload save. Expected Results: Save loads without errors appearing. Actual Results: Error appears on load of save. Notes: Error #1: develop-2630 (x64) ...s/construction\_data/construction\_data\_component.luac:97: attempt to index field 'entity' (a nil value) stack traceback: [C]: ? ...s/construction\_data/construction\_data…

---

<div class="post-metadata">

**Author:** ![OlderThanBefore](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/olderthanbefore/32/22691_2.png) [@OlderThanBefore](https://discourse.stonehearth.net/u/OlderThanBefore)\
**Post date:** [October 18, 2015, 5:57pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/14 "2015-10-18T17:57:10Z")

</div>

Haha, i’m reporting so many things right now 😃

## Summary:

Loading a savegame and then, these error poppep up though they don’t seems to have any negative acting on the game 😃

## Image:

 ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/3/8/381d4068b82b18565159209f0f4378163b89ade7.jpg)

 ![](https://us1.discourse-cdn.com/flex022/uploads/stonehearth/original/3X/e/e/ee730fc2473499e45bc9211552096e3040d72626.jpg)

## Steps to perform:

Load a game, watch error popup immediately

## Expected Results:

Loading a game without getting harassed by random error ( haha xD )

## Way to reproduce it:

I can provide the savegame if it’s really needed for further investigation 😃 but because it isn’t something really bad actually, i’ll let you tell me if it’s necessary 😃

## System Specification:

Intel i5 2500 3.30Ghz, 8 Ghz dd3 ram, GeForce gtx 580

## Build:

Latest build develop-2650 x64

---

<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:** [October 18, 2015, 5:53pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/15 "2015-10-18T17:53:11Z")

</div>

Hey there @OlderThanBefore, I believe this bug is the same as the one here:

> [@Construction\_data\_component engine error](http://discourse.stonehearth.net/t/ack-dev-2630-construction-data-component-engine-error/16988):
>
> Summary: Received engine error when loading previous save. Game appears to function normally despite this. Steps to reproduce: Unknown, error appeared on save load, will upload save. Expected Results: Save loads without errors appearing. Actual Results: Error appears on load of save. Notes: Error #1: develop-2630 (x64) ...s/construction\_data/construction\_data\_component.luac:97: attempt to index field 'entity' (a nil value) stack traceback: [C]: ? ...s/construction\_data/construction\_data…

It has been acknowledged, though @Albert said the error was part of a bigger issue.  
Paging @8BitCrab, @Relyss, or @SteveAdamo for a merge please…

---

<div class="post-metadata">

**Author:** ![Albert](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/albert/32/45599_2.png) [@Albert](https://discourse.stonehearth.net/u/Albert)\
**Post date:** [October 19, 2015, 11:56pm UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/16 "2015-10-19T23:56:42Z")

</div>

@jomaxro - I already made our load game fixes in develop-2650, so this looks like a different problem. If anyone knows how to reproduce this, please chime in. It might involve using undo (or destroy from the console) and saving?

---

<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:** [October 20, 2015, 1:09am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/17 "2015-10-20T01:09:23Z")

</div>

@Albert - So should this be “un-merged”, or do you want to keep troubleshooting this here?

---

<div class="post-metadata">

**Author:** ![Albert](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/albert/32/45599_2.png) [@Albert](https://discourse.stonehearth.net/u/Albert)\
**Post date:** [October 20, 2015, 4:16am UTC](https://discourse.stonehearth.net/t/construction-data-component-engine-error/16988/18 "2015-10-20T04:16:06Z")

</div>

Let’s keep it here for the moment. Thanks for the help!
