I’m seeing some baffling behavior since going to SDK 1.2. In two cases where I have a Subtree calling another Subtree, I have occurrences of the second Subtree “succeeding” after it executes the first behavior in its sequence, skipping over the remainder of the Subtree.
For one of these Subtrees, this happens every time. For another, it happens every other time. Very strange.
I don’t get any errors in the developer console. When I throw in log messages to trace where I am, execution just seems to skip after that first Subtree behavior to the next expected behavior past the Subtree call.
From sample code I can see how to collect and report status for a Behavior when created with jibo.bt.create, but I can’t find an equivalent method when the Behavior is called from a Subtree behavior, so I can’t tell if the Subtree is dying on an error that doesn’t get displayed in the console.
When I skip the Subtree call, placing the code from the Subtree directly in the calling behavior, the issue clears up.
Here’s my current version info:
jibo module: 2.0.3
behaviorify module: 1.0.0
For reference, the failing code is at https://github.com/chrooke/jibo-knock-knock/tree/master, and the version that works with the subtrees replaced with the sequences is at https://github.com/chrooke/jibo-knock-knock/tree/flatten-some-subtrees
The specific subtrees that show the issue are HearAJoke.bt called from KnockKnock.bt (this is the one that cuts short every time after the first time through), and the ‘Sorry’ call to attitudes/react.bt found in HearAJoke.bt. This is the one that skips every other time.