# Error after canceling and removing structure

**URL:** <https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773>\
**Category:** Resolved Reports\
**Tags:** resolved\
**Created:** [September 30, 2015, 5:56pm UTC](https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773 "2015-09-30T17:56:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordOfTheApes](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/lordoftheapes/32/46461_2.png) [@LordOfTheApes](https://discourse.stonehearth.net/u/LordOfTheApes)\
**Post date:** [September 30, 2015, 5:56pm UTC](https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773/1 "2015-09-30T17:56:31Z")

</div>

As soon as the structure is fully removed after “Remove” command this error appears.

develop-2617 (x64)  
stonehearth/components/ai/execution\_frame.luac:688: :aborted\_frame:radiant\_policy\_rethrow  
stack traceback:  
[C]: ?  
[C]: in function 'error’  
stonehearth/components/ai/execution\_frame.luac:688: in function '\_exit\_protected\_call’  
stonehearth/components/ai/execution\_frame.luac:489: in function 'abort’  
stonehearth/components/ai/execution\_unit\_v2.luac:223: in function 'fn’  
stonehearth/services/server/threads/thread.luac:98: in function 'interrupt’  
stonehearth/services/server/threads/thread.luac:95: in function 'unsafe\_interrupt’  
stonehearth/components/ai/execution\_unit\_v2.luac:223: in function '\_destroyed\_cb’  
stonehearth/components/ai/object\_monitor.luac:29: in function '\_on\_destroyed’  
stonehearth/components/ai/object\_monitor.luac:15: in function \<stonehearth/components/ai/object\_monitor.luac:15\>  
[C]: in function ‘destroy\_entity’  
…  
…arth/components/fabricator/fabricator\_component.luac:91: in function 'method’  
radiant/modules/events.luac:13: in function 'self’  
radiant/modules/events.luac:54: in function \<radiant/modules/events.luac:52\>  
[C]: in function 'xpcall’  
radiant/modules/events.luac:52: in function \<radiant/modules/events.luac:45\>  
[C]: in function 'destroy\_entity’  
radiant/modules/entities.luac:33: in function ‘destroy\_entity’  
…uction\_progress/construction\_progress\_component.luac:28: in function ‘set\_finished’  
…arth/components/fabricator/fabricator\_component.luac:338: in function ‘\_update\_fabricator\_region’  
…arth/components/fabricator/fabricator\_component.luac:364: in function \<…arth/components/fabricator/fabricator\_component.luac:364\>

---

<div class="post-metadata">

**Author:** ![Hieronymous](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/hieronymous/32/28530_2.png) [@Hieronymous](https://discourse.stonehearth.net/u/Hieronymous)\
**Post date:** [October 11, 2015, 4:05am UTC](https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773/2 "2015-10-11T04:05:39Z")

</div>

evelop-2630 (x64)  
radiant/modules/entities.luac:32: attempt to call method ‘is\_valid’ (a nil value)  
stack traceback:  
[C]: in function 'is\_valid’  
radiant/modules/entities.luac:32: in function 'destroy\_entity’  
stonehearth/call\_handlers/entities\_call\_handler.luac:5: in function \<stonehearth/call\_handlers/entities\_call\_handler.luac:5\>

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

On removing a large stockpile that had been my major storage point for most of the game.

Searching the forum saw other “attempt to call” bugs but not this particular variant so it seemed like it should be a separate thread, please merge if I’m incorrect.

---

<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 11, 2015, 4:06am UTC](https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773/3 "2015-10-11T04:06:33Z")

</div>

> [@Hieronymous](#):
>
> Searching the forum saw other “attempt to call” bugs but not this particular variant so it seemed like it should be a separate thread, please merge if I’m incorrect.

no worries … sounds somewhat similar to this report, so its been merged… thanks! 👍

---

<div class="post-metadata">

**Author:** ![Ysobell](https://avatars.discourse-cdn.com/v4/letter/y/e495f1/32.png) [@Ysobell](https://discourse.stonehearth.net/u/Ysobell)\
**Post date:** [October 11, 2015, 6:59pm UTC](https://discourse.stonehearth.net/t/error-after-canceling-and-removing-structure/16773/4 "2015-10-11T18:59:57Z")

</div>

I’ve got a similar sounding error message when removing a partially build building that refused to be finished. After closing the message it got removed alright.

> develop-2630 (x64)  
> stonehearth/components/ai/execution\_frame.luac:686: :aborted\_frame:radiant\_policy\_rethrow  
> stack traceback:  
> [C]: ?  
> [C]: in function ‘error’  
> stonehearth/components/ai/execution\_frame.luac:686: in function ‘\_exit\_protected\_call’  
> stonehearth/components/ai/execution\_frame.luac:487: in function ‘abort’  
> stonehearth/components/ai/execution\_unit\_v2.luac:223: in function ‘fn’  
> stonehearth/services/server/threads/thread.luac:98: in function ‘interrupt’  
> stonehearth/services/server/threads/thread.luac:95: in function ‘unsafe\_interrupt’  
> stonehearth/components/ai/execution\_unit\_v2.luac:223: in function ‘\_destroyed\_cb’  
> stonehearth/components/ai/object\_monitor.luac:29: in function ‘\_on\_destroyed’  
> stonehearth/components/ai/object\_monitor.luac:15: in function \<stonehearth/components/ai/object\_monitor.luac:15\>  
> [C]: in function ‘destroy\_entity’  
> …  
> …arth/components/fabricator/fabricator\_component.luac:91: in function ‘method’  
> radiant/modules/events.luac:13: in function ‘instance’  
> radiant/modules/events.luac:59: in function \<radiant/modules/events.luac:57\>  
> [C]: in function ‘xpcall’  
> radiant/modules/events.luac:57: in function \<radiant/modules/events.luac:50\>  
> [C]: in function ‘destroy\_entity’  
> radiant/modules/entities.luac:33: in function ‘destroy\_entity’  
> …uction\_progress/construction\_progress\_component.luac:28: in function ‘set\_finished’  
> …arth/components/fabricator/fabricator\_component.luac:338: in function ‘\_update\_fabricator\_region’  
> …arth/components/fabricator/fabricator\_component.luac:364: in function \<…arth/components/fabricator/fabricator\_component.luac:364\>
