# \[Dup\] Failed to sleep In bed error

**URL:** <https://discourse.stonehearth.net/t/dup-failed-to-sleep-in-bed-error/16691>\
**Category:** Other Reports\
**Created:** [September 28, 2015, 5:21pm UTC](https://discourse.stonehearth.net/t/dup-failed-to-sleep-in-bed-error/16691 "2015-09-28T17:21:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simica\_Na](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/simica_na/32/52745_2.png) [@Simica\_Na](https://discourse.stonehearth.net/u/Simica_Na)\
**Post date:** [September 28, 2015, 5:21pm UTC](https://discourse.stonehearth.net/t/dup-failed-to-sleep-in-bed-error/16691/1 "2015-09-28T17:21:26Z")

</div>

one of my hearths refuses to sleep lol

[http://s6.postimg.org/prd9yinfl/253250\_2015\_09\_28\_00001.png](http://s6.postimg.org/prd9yinfl/253250_2015_09_28_00001.png)  
possibly linked with this

> [@Bug: NPCs become fused with beds](http://discourse.stonehearth.net/t/bug-npcs-become-fused-with-beds/16672):
>
> Basically my blacksmith NPC got stuck on a bed, wouldn’t move for food or sleep, wouldn’t starve, whenever I moved the bed he was still stuck on it and when I sold the bed he was fused with to a merchant he disappeared from my NPC list altogether. Haven’t been able to reproduce the bug.

```
develop-2611 (x64)...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'assert'
	...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: in function 'start_thinking'
	stonehearth/services/server/ai/compound_action.luac:73: in function 'call_fn'
	stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_start_thinking'
	stonehearth/components/ai/execution_unit_v2.luac:243: in function '_do_start_thinking'
	stonehearth/components/ai/execution_unit_v2.luac:179: in function '_start_thinking_from_stopped'
	stonehearth/components/ai/execution_unit_v2.luac:96: in function '_start_thinking'
	stonehearth/components/ai/execution_frame.luac:307: in function '_restart_thinking'
	stonehearth/components/ai/execution_frame.luac:324: in function '_start_thinking_from_stopped'
	stonehearth/components/ai/execution_frame.luac:106: in function '_start_thinking'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:456: in function '_run_from_started'
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	stonehearth/components/ai/execution_unit_v2.luac:18: in function 'execute'
	stonehearth/ai/actions/idle_breathe_action.luac:3: in function 'call_fn'
	stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_run'
	stonehearth/components/ai/execution_unit_v2.luac:198: in function '_run_from_started'
	stonehearth/components/ai/execution_unit_v2.luac:141: in function '_run'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:456: in function '_run_from_started'
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	stonehearth/components/ai/execution_unit_v2.luac:18: in function 'execute'
	stonehearth/ai/actions/idle_action.luac:9: in function 'call_fn'
	stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_run'
	stonehearth/components/ai/execution_unit_v2.luac:198: in function '_run_from_started'
	stonehearth/components/ai/execution_unit_v2.luac:141: in function '_run'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:456: in function '_run_from_started'
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/execution_unit_v2.luac:300: in function '?'
	stonehearth/components/ai/execution_unit_v2.luac:18: in function 'execute'
	stonehearth/ai/actions/idle_top_action.luac:5: in function 'call_fn'
	stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_run'
	stonehearth/components/ai/execution_unit_v2.luac:198: in function '_run_from_started'
	stonehearth/components/ai/execution_unit_v2.luac:141: in function '_run'
	...
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>
develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: stonehearth/components/ai/execution_frame.luac:688: ...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:688: in function '_exit_protected_call'
	stonehearth/components/ai/execution_frame.luac:683: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:456: in function '_run_from_started'
	stonehearth/components/ai/execution_frame.luac:129: in function '_run'
	stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>
develop-2611 (x64)...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: assertion failed!stack traceback:
	stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
	[C]: in function 'assert'
	...ai/actions/sleeping/sleep_in_bed_trivial_action.luac:10: in function 'start_thinking'
	stonehearth/services/server/ai/compound_action.luac:73: in function 'call_fn'
	stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_start_thinking'
	stonehearth/components/ai/execution_unit_v2.luac:243: in function '_do_start_thinking'
	stonehearth/components/ai/execution_unit_v2.luac:179: in function '_start_thinking_from_stopped'
	stonehearth/components/ai/execution_unit_v2.luac:96: in function '_start_thinking'
	stonehearth/components/ai/execution_frame.luac:307: in function '_restart_thinking'
	stonehearth/components/ai/execution_frame.luac:324: in function '_start_thinking_from_stopped'
	stonehearth/components/ai/execution_frame.luac:106: in function '_start_thinking'
	...
	stonehearth/components/ai/execution_frame.luac:334: in function 'start_thinking'
	stonehearth/components/ai/execution_frame.luac:357: in function <stonehearth/components/ai/execution_frame.luac:352>
	[C]: in function 'xpcall'
	stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>
develop-2611 (x64)stonehearth/components/ai/execution_frame.luac:104: bad frame transition "stop" from "starting_thinking"stack traceback:
	stonehearth/services/server/threads/thread.luac:87: in function <stonehearth/services/server/threads/thread.luac:87>
	[C]: in function 'error'
	stonehearth/components/ai/execution_frame.luac:104: in function '_unknown_transition'
	stonehearth/components/ai/execution_frame.luac:172: in function '_stop'
	stonehearth/components/ai/execution_frame.luac:679: in function '_protected_call'
	stonehearth/components/ai/execution_frame.luac:362: in function 'run'
	stonehearth/components/ai/ai_component.luac:178: 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>

```

---

<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:** [September 29, 2015, 12:43am UTC](https://discourse.stonehearth.net/t/dup-failed-to-sleep-in-bed-error/16691/2 "2015-09-29T00:43:46Z")

</div>

Split this topic on September 29, 2015, 12:43am UTC

4 posts were merged into an existing topic: [Bug: NPCs become fused with beds](https://discourse.stonehearth.net/t/bug-npcs-become-fused-with-beds/16672)

---

<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:** [September 29, 2015, 12:43am UTC](https://discourse.stonehearth.net/t/dup-failed-to-sleep-in-bed-error/16691/3 "2015-09-29T00:43:53Z")

</div>

Closed on September 29, 2015, 12:43am UTC


