summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fsm.c15
-rw-r--r--tests/fsm/fsm_dealloc_test.err2288
2 files changed, 307 insertions, 1996 deletions
diff --git a/src/fsm.c b/src/fsm.c
index 6aad37af..1e8909ec 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -630,6 +630,13 @@ static int state_chg(struct osmo_fsm_inst *fi, uint32_t new_state,
const struct osmo_fsm_state *st = &fsm->states[fi->state];
struct timeval remaining;
+ if (fi->proc.terminating) {
+ LOGPFSMSRC(fi, file, line,
+ "FSM instance already terminating, not changing state to %s\n",
+ osmo_fsm_state_name(fsm, new_state));
+ return -EINVAL;
+ }
+
/* validate if new_state is a valid state */
if (!(st->out_state_mask & (1 << new_state))) {
LOGPFSMLSRC(fi, LOGL_ERROR, file, line,
@@ -840,6 +847,14 @@ int _osmo_fsm_inst_dispatch(struct osmo_fsm_inst *fi, uint32_t event, void *data
}
fsm = fi->fsm;
+
+ if (fi->proc.terminating) {
+ LOGPFSMSRC(fi, file, line,
+ "FSM instance already terminating, not dispatching event %s\n",
+ osmo_fsm_event_name(fsm, event));
+ return -EINVAL;
+ }
+
OSMO_ASSERT(fi->state < fsm->num_states);
fs = &fi->fsm->states[fi->state];
diff --git a/tests/fsm/fsm_dealloc_test.err b/tests/fsm/fsm_dealloc_test.err
index 973f3d42..ce506e24 100644
--- a/tests/fsm/fsm_dealloc_test.err
+++ b/tests/fsm/fsm_dealloc_test.err
@@ -45,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)
@@ -63,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)
@@ -114,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)
@@ -132,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)
@@ -154,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
@@ -242,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)
@@ -260,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)
@@ -311,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)
@@ -329,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)
@@ -351,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
@@ -435,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)
@@ -459,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)
@@ -502,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)
@@ -537,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)
@@ -553,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.
@@ -638,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)
@@ -662,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)
@@ -705,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)
@@ -740,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)
@@ -756,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:
@@ -879,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)
@@ -897,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)
@@ -948,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)
@@ -964,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()