aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fsm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fsm')
-rw-r--r--tests/fsm/fsm_dealloc_test.c69
-rw-r--r--tests/fsm/fsm_dealloc_test.err3694
2 files changed, 2751 insertions, 1012 deletions
diff --git a/tests/fsm/fsm_dealloc_test.c b/tests/fsm/fsm_dealloc_test.c
index ce492056..9a6974d9 100644
--- a/tests/fsm/fsm_dealloc_test.c
+++ b/tests/fsm/fsm_dealloc_test.c
@@ -355,7 +355,7 @@ void obj_term(struct obj *obj)
osmo_fsm_inst_term(obj->fi, OSMO_FSM_TERM_REGULAR, NULL);
}
-void test_dealloc(enum objname trigger, bool by_destroy_event)
+void test_dealloc(enum objname trigger, bool by_destroy_event, void *loop_ctx)
{
struct scene *s = scene_alloc();
const char *label = by_destroy_event ? "destroy-event" : "term";
@@ -383,16 +383,63 @@ void test_dealloc(enum objname trigger, bool by_destroy_event)
LOGP(DLGLOBAL, LOGL_DEBUG, "--- %d objects remain. cleaning up\n", remain);
} else
LOGP(DLGLOBAL, LOGL_DEBUG, "--- all deallocated.\n");
+
+ if (loop_ctx) {
+ fprintf(stderr, "*** loop_ctx contains %zu blocks, deallocating.\n",
+ talloc_total_blocks(loop_ctx));
+ talloc_free_children(loop_ctx);
+ }
+
+ /* Silently free the remaining objects. */
scene_clean(s);
+ if (loop_ctx)
+ talloc_free_children(loop_ctx);
}
-int main(void)
+static void trigger_tests(void *loop_ctx)
{
- enum objname trigger;
size_t ctx_blocks;
size_t ctx_size;
+ enum objname trigger;
int by_destroy_event;
+ ctx_blocks = talloc_total_blocks(ctx);
+ ctx_size = talloc_total_size(ctx);
+
+ for (trigger = 0; trigger < scene_size; trigger++) {
+ for (by_destroy_event = 0; by_destroy_event < 2; by_destroy_event++) {
+ test_dealloc(trigger, (bool)by_destroy_event, loop_ctx);
+
+ if (ctx_blocks != talloc_total_blocks(ctx)
+ || ctx_size != talloc_total_size(ctx)) {
+ talloc_report_full(ctx, stderr);
+ OSMO_ASSERT(false);
+ }
+ }
+ }
+}
+
+void test_osmo_fsm_term_safely()
+{
+ fprintf(stderr, "\n\n%s()\n", __func__);
+ osmo_fsm_term_safely(true);
+ trigger_tests(NULL);
+ osmo_fsm_term_safely(false);
+ fprintf(stderr, "\n\n%s() done\n", __func__);
+}
+
+void test_osmo_fsm_set_dealloc_ctx()
+{
+ fprintf(stderr, "\n\n%s()\n", __func__);
+ void *dealloc_ctx = talloc_named_const(ctx, 0, "fsm_dealloc");
+ osmo_fsm_set_dealloc_ctx(dealloc_ctx);
+ trigger_tests(dealloc_ctx);
+ osmo_fsm_set_dealloc_ctx(NULL);
+ fprintf(stderr, "\n\n%s() done\n", __func__);
+}
+
+int main(void)
+{
ctx = talloc_named_const(NULL, 0, "main");
osmo_init_logging2(ctx, NULL);
@@ -405,22 +452,10 @@ int main(void)
log_set_category_filter(osmo_stderr_target, DLGLOBAL, 1, LOGL_DEBUG);
- osmo_fsm_term_safely(true);
osmo_fsm_register(&test_fsm);
- ctx_blocks = talloc_total_blocks(ctx);
- ctx_size = talloc_total_size(ctx);
-
- for (trigger = 0; trigger < scene_size; trigger++) {
- for (by_destroy_event = 0; by_destroy_event < 2; by_destroy_event++) {
- test_dealloc(trigger, (bool)by_destroy_event);
- if (ctx_blocks != talloc_total_blocks(ctx)
- || ctx_size != talloc_total_size(ctx)) {
- talloc_report_full(ctx, stderr);
- OSMO_ASSERT(false);
- }
- }
- }
+ test_osmo_fsm_term_safely();
+ test_osmo_fsm_set_dealloc_ctx();
talloc_free(ctx);
return 0;
diff --git a/tests/fsm/fsm_dealloc_test.err b/tests/fsm/fsm_dealloc_test.err
index d12c5aa3..ce506e24 100644
--- a/tests/fsm/fsm_dealloc_test.err
+++ b/tests/fsm/fsm_dealloc_test.err
@@ -1,3 +1,6 @@
+
+
+test_osmo_fsm_term_safely()
DLGLOBAL DEBUG scene_alloc()
DLGLOBAL DEBUG test(root){alive}: Allocated
DLGLOBAL DEBUG test(root){alive}: Allocated
@@ -42,14 +45,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -60,23 +56,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -111,14 +92,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -129,21 +103,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -151,42 +112,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -239,14 +183,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 2 (root.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (root.alive(),__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 3 (root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 2 (root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 1 (root.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -257,23 +194,8 @@ DLGLOBAL DEBUG 2 (root.alive(),__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 3 (2*root.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 4 (2*root.alive(),__twig1a.cleanup(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 3 (2*root.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (root.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (root.alive(),__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (root.alive(),__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 3 (root.alive(),__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (root.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 1 (root.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -308,14 +230,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -326,21 +241,8 @@ DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 8 (root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 7 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -348,42 +250,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 7 (2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
-DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 4 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 3 (root.alive(),_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 2 (root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (2*root.alive(),_branch1.cleanup(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 3 (2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 1 (root.alive())
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 2 (root.alive(),root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 1 (root.alive())
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -432,14 +317,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 1 (__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig0b.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig0b.cleanup(),_branch0.alive(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig0b.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG 1 (__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(_branch0)
@@ -456,15 +334,7 @@ DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
DLGLOBAL DEBUG 3 (__twig0a.cleanup(),other.alive(),other.other_gone())
DLGLOBAL DEBUG 2 (__twig0a.cleanup(),other.alive())
DLGLOBAL DEBUG 1 (__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig0a.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig0a.cleanup(),_branch0.alive(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig0a.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(_branch0)
@@ -499,14 +369,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(_branch0)
@@ -534,15 +397,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(_branch0)
@@ -550,43 +405,20 @@ DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 3 (_branch0.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch0.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 1 (_branch0.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 1 (root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG --- after term cascade:
DLGLOBAL DEBUG --- all deallocated.
@@ -635,14 +467,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 3 (2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(_branch0)
@@ -659,15 +484,7 @@ DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
DLGLOBAL DEBUG 4 (_branch0.alive(),__twig0a.cleanup(),other.alive(),other.other_gone())
DLGLOBAL DEBUG 3 (_branch0.alive(),__twig0a.cleanup(),other.alive())
DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 3 (2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(_branch0)
@@ -702,14 +519,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup(),_branch1.child_gone(
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(_branch0)
@@ -737,15 +547,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup(),_branch1.child_gone(
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(_branch0)
@@ -753,43 +555,20 @@ DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive(),root.chil
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: still exists: child[0]
-DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 4 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(_branch0)
DLGLOBAL DEBUG 2 (_branch0.alive(),_branch0.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG --- after destroy-event cascade:
@@ -876,14 +655,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -894,23 +666,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -945,15 +702,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -961,42 +710,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -1086,14 +818,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -1104,23 +829,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -1155,15 +865,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -1171,42 +873,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -1285,14 +970,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -1303,23 +981,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -1355,21 +1018,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -1377,42 +1027,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -1495,14 +1128,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(root)
@@ -1513,23 +1139,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -1565,21 +1176,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -1587,42 +1185,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -1668,14 +1249,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 1 (__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(_branch1)
@@ -1703,15 +1277,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(_branch1)
@@ -1746,14 +1312,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(_branch1)
@@ -1764,21 +1323,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(_branch1)
@@ -1786,43 +1332,20 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 1 (root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG --- after term cascade:
DLGLOBAL DEBUG --- all deallocated.
@@ -1871,14 +1394,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (2*_branch1.alive(),__twig1b.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 3 (2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch1.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(_branch1)
@@ -1906,15 +1422,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 3 (_branch1.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (2*_branch1.alive(),__twig1a.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 3 (2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch1.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(_branch1)
@@ -1949,14 +1457,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone(
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(_branch1)
@@ -1967,21 +1468,8 @@ DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanu
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 8 (_branch1.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone(
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(_branch1)
@@ -1989,43 +1477,20 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 8 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.chil
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 7 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 4 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(_branch1)
DLGLOBAL DEBUG 2 (_branch1.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (_branch1.alive(),_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 1 (_branch1.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG --- after destroy-event cascade:
@@ -2087,14 +1552,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2129,14 +1587,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 9 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_bran
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2147,21 +1598,8 @@ DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 9 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 9 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_bran
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2169,36 +1607,17 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 9 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 8 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
-DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 7 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 5 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 4 (__twig1a.cleanup(),2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2209,22 +1628,10 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 1 (_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG --- after term cascade:
DLGLOBAL DEBUG --- all deallocated.
@@ -2288,14 +1695,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2330,14 +1730,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 10 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0
-DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2348,21 +1741,8 @@ DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.clea
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 10 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0
-DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 10 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2370,36 +1750,17 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 10 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branc
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 9 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch
-DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),2*root.alive(),_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(__twig1a)
@@ -2410,22 +1771,10 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(__twig1a)
DLGLOBAL DEBUG 2 (__twig1a.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 2 (__twig1a.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 1 (__twig1a.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.alive(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 1 (__twig1a.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated, including all deferred deallocations
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG --- after destroy-event cascade:
@@ -2506,23 +1855,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -2557,14 +1891,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -2575,21 +1902,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -2597,42 +1911,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -2716,23 +2013,8 @@ DLGLOBAL DEBUG 1 (__twig1a.cleanup())
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (__twig1a.cleanup(),_branch1.alive(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 2 (__twig1a.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(root)
@@ -2767,14 +2049,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(root)
@@ -2785,21 +2060,8 @@ DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.aliv
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(root)
@@ -2807,42 +2069,25 @@ DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 7 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
-DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
-DLGLOBAL DEBUG 6 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch0){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
DLGLOBAL DEBUG test(other){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (_branch1.cleanup())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 3 (_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 2 (_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(root)
DLGLOBAL DEBUG 1 (root.cleanup())
DLGLOBAL DEBUG test(root){alive}: cleanup()
DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG test(root){alive}: Deallocated, including all deferred deallocations
@@ -2900,14 +2145,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(other)
@@ -2918,21 +2156,8 @@ DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0a.cleanup())
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.alive())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.alive(),other.other_gone())
-DLGLOBAL DEBUG 4 (other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.alive())
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(other)
@@ -2972,14 +2197,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),2*_branch1.alive(),__twig1b.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(other)
@@ -3007,15 +2225,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(other)
DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),2*_branch1.alive(),__twig1a.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 4 (other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(other)
@@ -3023,22 +2233,10 @@ DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),_branch1.cleanup())
DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 5 (other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
-DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(other)
DLGLOBAL DEBUG 1 (other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
@@ -3103,14 +2301,7 @@ DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
-DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0b.cleanup())
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0b){alive}: Deferring: will deallocate with test(other)
@@ -3121,21 +2312,8 @@ DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanu
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
-DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
-DLGLOBAL DEBUG 5 (2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
-DLGLOBAL DEBUG 6 (2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup(),other.other_gone())
-DLGLOBAL DEBUG 5 (2*other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup(),_branch0.child_gone())
-DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
-DLGLOBAL DEBUG test(_branch0){alive}: No more children
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch0.alive(),__twig0a.cleanup())
-DLGLOBAL DEBUG test(_branch0){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
DLGLOBAL DEBUG test(__twig0a){alive}: Deferring: will deallocate with test(other)
@@ -3175,14 +2353,7 @@ DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
-DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1b.cleanup())
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1b){alive}: Deferring: will deallocate with test(other)
@@ -3210,15 +2381,7 @@ DLGLOBAL DEBUG test(root){alive}: cleanup() done
DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: Deferring: will deallocate with test(other)
DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup(),_branch1.child_gone())
-DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[0] = __twig1a
-DLGLOBAL DEBUG test(_branch1){alive}: No more children
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),2*_branch1.alive(),__twig1a.cleanup())
-DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
DLGLOBAL DEBUG test(__twig1a){alive}: Deferring: will deallocate with test(other)
@@ -3226,27 +2389,2568 @@ DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(other)
+DLGLOBAL DEBUG 2 (other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (other.alive())
+DLGLOBAL DEBUG test(other){alive}: Deallocated, including all deferred deallocations
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG --- all deallocated.
+
+
+test_osmo_fsm_term_safely() done
+
+
+test_osmo_fsm_set_dealloc_ctx()
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at root
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (root.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (root.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (root.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 2 (root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (root.alive(),_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 3 (root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 4 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 6 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 4 (root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 2 (root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (root.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 2 (root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 1 (__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (__twig0a.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: removing reference _branch0.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch0.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[0] = _branch0
+DLGLOBAL DEBUG 2 (_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch0.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[1] -> _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.other_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_OTHER_GONE: Dropped reference _branch1.other[0] = other
+DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 7 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 7 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 6 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch0.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (_branch0.alive(),__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (_branch0.alive(),__twig0a.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG 3 (_branch0.alive(),__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG 2 (_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 2 (_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: removing reference _branch0.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[0] = _branch0
+DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 4 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[1] -> _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.other_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_OTHER_GONE: Dropped reference _branch1.other[0] = other
+DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 8 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.othe
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 8 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.clea
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 7 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 6 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 4 (_branch0.alive(),_branch0.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (_branch0.alive(),_branch0.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 2 (_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (__twig0a.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 3 (__twig0a.cleanup(),_branch0.alive(),_branch0.child_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
+DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[1]
+DLGLOBAL DEBUG 2 (__twig0a.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 1 (__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (__twig0a.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 2 (__twig0a.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (__twig0a.alive(),__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (__twig0a.alive(),__twig0a.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG 3 (__twig0a.alive(),__twig0a.cleanup(),other.alive())
+DLGLOBAL DEBUG 2 (__twig0a.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (__twig0a.alive(),__twig0a.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 4 (__twig0a.alive(),__twig0a.cleanup(),_branch0.alive(),_branch0.child_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[0] = __twig0a
+DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[1]
+DLGLOBAL DEBUG 3 (__twig0a.alive(),__twig0a.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 2 (__twig0a.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (__twig0a.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig0a.alive(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 1 (__twig0a.alive())
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at __twig0b
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 1 (__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig0b.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 3 (__twig0b.cleanup(),_branch0.alive(),_branch0.child_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
+DLGLOBAL DEBUG 2 (__twig0b.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 1 (__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 1 (_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at __twig0b
+DLGLOBAL DEBUG test(__twig0b){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (__twig0b.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 2 (__twig0b.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (__twig0b.alive(),__twig0b.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 4 (__twig0b.alive(),__twig0b.cleanup(),_branch0.alive(),_branch0.child_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE: Dropped reference _branch0.child[1] = __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: still exists: child[0]
+DLGLOBAL DEBUG 3 (__twig0b.alive(),__twig0b.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 2 (__twig0b.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (__twig0b.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig0b.alive(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch0){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 1 (__twig0b.alive())
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (_branch1.alive(),__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 3 (_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 4 (_branch1.alive(),__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 2 (_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 2 (_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 4 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 6 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 4 (_branch1.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (_branch1.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 2 (_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 5 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 7 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 6 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 5 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 3 (__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (__twig1a.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (__twig1a.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 8 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 7 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 6 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 4 (__twig1a.alive(),__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (__twig1a.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 2 (__twig1a.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (__twig1a.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at __twig1b
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 3 (__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
+DLGLOBAL DEBUG 2 (__twig1b.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG 1 (__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 1 (_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at __twig1b
+DLGLOBAL DEBUG test(__twig1b){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (__twig1b.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 2 (__twig1b.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (__twig1b.alive(),__twig1b.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 4 (__twig1b.alive(),__twig1b.cleanup(),_branch1.alive(),_branch1.child_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE: Dropped reference _branch1.child[1] = __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: still exists: child[0]
+DLGLOBAL DEBUG 3 (__twig1b.alive(),__twig1b.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG 2 (__twig1b.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 1 (__twig1b.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 2 (__twig1b.alive(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(_branch1){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 1 (__twig1b.alive())
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG --- after destroy-event cascade:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG --- 7 objects remain. cleaning up
+*** loop_ctx contains 5 blocks, deallocating.
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_ERROR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 1 (__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: removing reference _branch1.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.other_gone())
+DLGLOBAL DEBUG test(other){alive}: EV_OTHER_GONE: Dropped reference other.other[1] = _branch1
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 5 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (_branch1.cleanup(),other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (_branch1.cleanup(),other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (_branch1.cleanup(),other.alive())
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG 1 (_branch1.cleanup())
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG 1 (root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: removing reference root.other[0] -> __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before term cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- term at other
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 1 (other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
+DLGLOBAL DEBUG 4 (other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
-DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive(),root.child_gone())
-DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[1] = _branch1
-DLGLOBAL DEBUG test(root){alive}: No more children
-DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup(),root.alive())
-DLGLOBAL DEBUG test(root){alive}: Ignoring trigger to terminate: already terminating
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG 5 (other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
+DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
+DLGLOBAL DEBUG 4 (other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch0.alive(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 1 (other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[1] -> _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),_branch1.other_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_OTHER_GONE: Dropped reference _branch1.other[0] = other
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 5 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 5 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 4 (other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 3 (other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
-DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG 2 (other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG 1 (other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup() done
+DLGLOBAL DEBUG 0 (-)
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
+DLGLOBAL DEBUG --- after term cascade:
+DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+DLGLOBAL DEBUG scene_alloc()
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(_branch0){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: is child of test(_branch0)
+DLGLOBAL DEBUG test(root){alive}: Allocated
+DLGLOBAL DEBUG test(root){alive}: is child of test(root)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(_branch1){alive}: Allocated
+DLGLOBAL DEBUG test(_branch1){alive}: is child of test(_branch1)
+DLGLOBAL DEBUG test(other){alive}: Allocated
+DLGLOBAL DEBUG test(_branch0){alive}: _branch0.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[0] = _branch0
+DLGLOBAL DEBUG test(__twig0a){alive}: __twig0a.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = __twig0a
+DLGLOBAL DEBUG test(_branch1){alive}: _branch1.other[0] = other
+DLGLOBAL DEBUG test(other){alive}: other.other[1] = _branch1
+DLGLOBAL DEBUG test(__twig1a){alive}: __twig1a.other[0] = root
+DLGLOBAL DEBUG test(root){alive}: root.other[0] = __twig1a
+DLGLOBAL DEBUG ------ before destroy-event cascade, got:
+DLGLOBAL DEBUG root
+DLGLOBAL DEBUG _branch0
+DLGLOBAL DEBUG __twig0a
+DLGLOBAL DEBUG __twig0b
+DLGLOBAL DEBUG _branch1
+DLGLOBAL DEBUG __twig1a
+DLGLOBAL DEBUG __twig1b
+DLGLOBAL DEBUG other
+DLGLOBAL DEBUG ---
+DLGLOBAL DEBUG --- destroy-event at other
+DLGLOBAL DEBUG test(other){alive}: Received Event EV_DESTROY
+DLGLOBAL DEBUG 1 (other.alive())
+DLGLOBAL DEBUG test(other){alive}: alive(EV_DESTROY)
+DLGLOBAL DEBUG test(other){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(other){alive}: pre_term()
+DLGLOBAL DEBUG 2 (other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: cleanup()
+DLGLOBAL DEBUG test(other){alive}: scene forgets other
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[0] -> _branch0
+DLGLOBAL DEBUG test(_branch0){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.other_gone())
+DLGLOBAL DEBUG test(_branch0){alive}: EV_OTHER_GONE: Dropped reference _branch0.other[0] = other
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch0){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0b){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0b.cleanup())
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0b){alive}: scene forgets __twig0b
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0b){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig0a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig0a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig0a){alive}: Removing from parent test(_branch0)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),__twig0a.cleanup())
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig0a){alive}: scene forgets __twig0a
+DLGLOBAL DEBUG test(__twig0a){alive}: removing reference __twig0a.other[0] -> other
+DLGLOBAL DEBUG test(other){alive}: FSM instance already terminating, not dispatching event EV_OTHER_GONE
+DLGLOBAL DEBUG test(_branch0){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig0a){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(__twig0a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig0a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch0){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch0){alive}: scene forgets _branch0
DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
-DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),root.alive())
+DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
+DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive(),root.child_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE: Dropped reference root.child[0] = _branch0
+DLGLOBAL DEBUG test(root){alive}: still exists: child[1]
+DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup(),root.alive())
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),_branch0.cleanup())
+DLGLOBAL DEBUG test(_branch0){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG test(_branch0){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch0){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_CHILD_GONE
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch0.alive(),root.alive())
DLGLOBAL DEBUG test(root){alive}: alive(EV_CHILD_GONE)
DLGLOBAL DEBUG test(root){alive}: EV_CHILD_GONE with NULL data, must be a parent_term event. Ignore.
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch0.alive())
+DLGLOBAL DEBUG 2 (other.alive(),other.cleanup())
+DLGLOBAL DEBUG test(other){alive}: removing reference other.other[1] -> _branch1
+DLGLOBAL DEBUG test(_branch1){alive}: Received Event EV_OTHER_GONE
DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
-DLGLOBAL DEBUG test(_branch1){alive}: Deferring: will deallocate with test(other)
+DLGLOBAL DEBUG test(_branch1){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.other_gone())
+DLGLOBAL DEBUG test(_branch1){alive}: EV_OTHER_GONE: Dropped reference _branch1.other[0] = other
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(_branch1){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1b){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1b){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1b.cleanup())
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1b){alive}: scene forgets __twig1b
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1b){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1b){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1b){alive}: Deallocated
+DLGLOBAL DEBUG test(__twig1a){alive}: Terminating (cause = OSMO_FSM_TERM_PARENT)
+DLGLOBAL DEBUG test(__twig1a){alive}: pre_term()
+DLGLOBAL DEBUG test(__twig1a){alive}: Removing from parent test(_branch1)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup()
+DLGLOBAL DEBUG test(__twig1a){alive}: scene forgets __twig1a
+DLGLOBAL DEBUG test(__twig1a){alive}: removing reference __twig1a.other[0] -> root
+DLGLOBAL DEBUG test(root){alive}: Received Event EV_OTHER_GONE
+DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: alive(EV_OTHER_GONE)
+DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.other_gone())
+DLGLOBAL DEBUG test(root){alive}: EV_OTHER_GONE: Dropped reference root.other[0] = __twig1a
+DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Terminating (cause = OSMO_FSM_TERM_REGULAR)
+DLGLOBAL DEBUG test(root){alive}: pre_term()
+DLGLOBAL DEBUG test(_branch1){alive}: Ignoring trigger to terminate: already terminating
+DLGLOBAL ERROR test(root){alive}: Internal error while terminating child FSMs: a child FSM is stuck
+DLGLOBAL DEBUG 6 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive(),root.cleanup())
+DLGLOBAL DEBUG test(root){alive}: cleanup()
+DLGLOBAL DEBUG test(root){alive}: scene forgets root
+DLGLOBAL DEBUG test(root){alive}: cleanup() done
+DLGLOBAL DEBUG 5 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup(),root.alive())
+DLGLOBAL DEBUG test(root){alive}: Freeing instance
+DLGLOBAL DEBUG test(root){alive}: Deallocated
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),__twig1a.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(__twig1a){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(__twig1a){alive}: Freeing instance
+DLGLOBAL DEBUG test(__twig1a){alive}: Deallocated
+DLGLOBAL DEBUG test(_branch1){alive}: Removing from parent test(root)
+DLGLOBAL DEBUG 4 (other.alive(),other.cleanup(),_branch1.alive(),_branch1.cleanup())
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup()
+DLGLOBAL DEBUG test(_branch1){alive}: scene forgets _branch1
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
+DLGLOBAL DEBUG test(_branch1){alive}: cleanup() done
+DLGLOBAL DEBUG 3 (other.alive(),other.cleanup(),_branch1.alive())
+DLGLOBAL DEBUG test(_branch1){alive}: Freeing instance
+DLGLOBAL DEBUG test(_branch1){alive}: Deallocated
+DLGLOBAL DEBUG test(root){alive}: FSM instance already terminating, not dispatching event EV_CHILD_GONE
DLGLOBAL DEBUG 2 (other.alive(),other.cleanup())
DLGLOBAL DEBUG test(other){alive}: cleanup() done
DLGLOBAL DEBUG 1 (other.alive())
-DLGLOBAL DEBUG test(other){alive}: Deallocated, including all deferred deallocations
+DLGLOBAL DEBUG test(other){alive}: Freeing instance
+DLGLOBAL DEBUG test(other){alive}: Deallocated
DLGLOBAL DEBUG 0 (-)
DLGLOBAL DEBUG --- after destroy-event cascade:
DLGLOBAL DEBUG --- all deallocated.
+*** loop_ctx contains 33 blocks, deallocating.
+
+
+test_osmo_fsm_set_dealloc_ctx() done