diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-10-05 05:13:23 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2019-10-29 17:28:30 +0100 |
commit | b1bbe24c09c0f508d7bc916f08b1ed4d09986df5 (patch) | |
tree | 5ea45d1679c831883e41d4cd3658dfce344e2549 /tests/fsm | |
parent | 988f6d72c55a041b9b382143e2548571a3510abc (diff) |
fsm: refuse state chg and events after term
Refuse state changes and event dispatch for FSM instances that are already
terminating.
It is assumed that refusing state changes and events after FSM termination is
seen as the sane expected behavior, hence this change in behavior is merged
without being configurable.
There is no fallout in current Osmocom code trees. fsm_dealloc_test needs a
changed expected output, since it is explicitly creating complex FSM structures
that terminate. Currently no other C test in Osmocom code needs adjusting.
Rationale:
Where multiple FSM instances are collaborating (like in osmo-bsc or osmo-msc),
a terminating FSM instance often causes events to be dispatched back to itself,
or causes state changes in FSM instances that are already terminating. That is
hard to avoid, since each FSM instance could be a cause of failure, and wants
to notify all the others of that, which in turn often choose to terminate.
Another use case: any function that dispatches events or state changes to more
than one FSM instance must be sure that after the first event dispatch, the
second FSM instance is in fact still allocated. Furthermore, if the second FSM
instance *has* terminated from the first dispatch, this often means that no
more actions should be taken. That could be done by an explicit check for
fsm->proc.terminating, but a more general solution is to do this check
internally in fsm.c.
In practice, I need this to avoid a crash in libosmo-mgcp-client, when an
on_success() event dispatch causes the MGCP endpoint FSM to deallocate. The
earlier dealloc-in-main-loop patch fixed part of it, but not all.
Change-Id: Ia81a0892f710db86bd977462730b69f0dcc78f8c
Diffstat (limited to 'tests/fsm')
-rw-r--r-- | tests/fsm/fsm_dealloc_test.err | 2288 |
1 files changed, 292 insertions, 1996 deletions
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 (_ |