# R851 - errors thrown when saving building template - RESOLVED by r852

**URL:** <https://discourse.stonehearth.net/t/r851-errors-thrown-when-saving-building-template-resolved-by-r852/35700>\
**Category:** Bug Reports\
**Created:** [June 1, 2018, 3:05am UTC](https://discourse.stonehearth.net/t/r851-errors-thrown-when-saving-building-template-resolved-by-r852/35700 "2018-06-01T03:05:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spacefiddle](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/spacefiddle/32/27280_2.png) [@spacefiddle](https://discourse.stonehearth.net/u/spacefiddle)\
**Post date:** [June 1, 2018, 3:05am UTC](https://discourse.stonehearth.net/t/r851-errors-thrown-when-saving-building-template-resolved-by-r852/35700/1 "2018-06-01T03:05:04Z")

</div>

Edit: HOLY GUACAMOLE THAT WAS FAST. r852 released just now resolved this; saved a template, nary a traceback in sight. /impressed

* * *

New build from a few minutes ago, 24.10.4 r851steam unstable. Save attached; new game, Rayya’s in the desert, attempted to make a clay building template. Using tier1 available items only. Items appeared to queue up normally, but the following three tracebacks appeared as soon as I saved the template:

* * *

release-851 (x64)  
…onehearth/renderers/structure/structure\_renderer.lua:85: attempt to index local ‘origin’ (a nil value)  
stack traceback:  
[C]: ?  
…onehearth/renderers/structure/structure\_renderer.lua:85: in function ‘\_update\_shadow\_node’  
…onehearth/renderers/structure/structure\_renderer.lua:94: in function ‘on\_changed’  
…onehearth/renderers/structure/structure\_renderer.lua:46: in function \<…onehearth/renderers/structure/structure\_renderer.lua:45\>  
[C]: in function ‘push\_object\_state’  
…onehearth/renderers/structure/structure\_renderer.lua:54: in function \<…onehearth/renderers/structure/structure\_renderer.lua:20\>

release-851 (x64)  
…onehearth/renderers/structure/structure\_renderer.lua:101: attempt to call method ‘destroy’ (a nil value)  
stack traceback:  
[C]: in function ‘destroy’  
…onehearth/renderers/structure/structure\_renderer.lua:101: in function \<…onehearth/renderers/structure/structure\_renderer.lua:97\>  
[C]: in function ‘destroy\_authoring\_entity’  
radiant/modules/client\_entities.lua:25: in function ‘destroy\_entity’  
stonehearth/stonehearth\_common.lua:32: in function ‘destroy\_child\_entities’  
stonehearth/stonehearth\_client.lua:66: in function ‘cleanup\_entity’  
stonehearth/stonehearth\_client.lua:92: in function \<stonehearth/stonehearth\_client.lua:91\>  
[C]: in function ‘xpcall’  
radiant/modules/commons.lua:73: in function ‘xpcall’  
stonehearth/stonehearth\_client.lua:91: in function \<stonehearth/stonehearth\_client.lua:90\>  
[C]: ?  
[C]: in function ‘trigger’  
radiant/modules/events.lua:55: in function \<radiant/modules/events.lua:55\>  
[C]: in function ‘destroy\_authoring\_entity’  
radiant/modules/client\_entities.lua:25: in function ‘destroy\_entity’  
stonehearth/lib/building/template\_utils.lua:953: in function \<stonehearth/lib/building/template\_utils.lua:943\>

release-851 (x64)  
c++ exception: lua runtime error  
stack traceback:  
[C]: in function ‘destroy\_authoring\_entity’  
radiant/modules/client\_entities.lua:25: in function ‘destroy\_entity’  
stonehearth/stonehearth\_common.lua:32: in function ‘destroy\_child\_entities’  
stonehearth/stonehearth\_client.lua:66: in function ‘cleanup\_entity’  
stonehearth/stonehearth\_client.lua:92: in function \<stonehearth/stonehearth\_client.lua:91\>  
[C]: in function ‘xpcall’  
radiant/modules/commons.lua:73: in function ‘xpcall’  
stonehearth/stonehearth\_client.lua:91: in function \<stonehearth/stonehearth\_client.lua:90\>  
[C]: ?  
[C]: in function ‘trigger’  
radiant/modules/events.lua:55: in function \<radiant/modules/events.lua:55\>  
[C]: in function ‘destroy\_authoring\_entity’  
radiant/modules/client\_entities.lua:25: in function ‘destroy\_entity’  
stonehearth/lib/building/template\_utils.lua:953: in function \<stonehearth/lib/building/template\_utils.lua:943\>

No mods. Win7 x64  
.[template-traceback.7z](https://discourse.stonehearth.net/uploads/short-url/qjUPho14f6kjCQlLErxDp4FKE7A.7z) (1.9 MB)
