RESOLVED: Possible bug

Any help Is appreciated.

This simple .tox toggles data between 2 dats. When in network mode everything works fine. But when in Performance or even when you zoom out of the base it stops working. The Count chop no longer counts and teh logic completely stops. I have tried a few things to no avail so i am leaning towards a bug?

Windows 10
build 62160

Thanks :astonished: !
Select toggle.tox (4.15 KB)

Thanks for the report, looks like a cooking issue, we’ll get back to you.

So one of the issues seems to be that “count1” isn’t up-to-date. When you are in Perform mode, you are no longer looking count1 (viewer is off) other than via chopexec1, which only looks at count1 when it is triggered offToOn. Since offToOn isn’t happening every frame, count1 is not correct. To fix, add a Null CHOP after count1 and set it to cook always. Otherwise, count1 is only cooked when data is requested, which is infrequent.

The other issue is that timer1 isn’t always triggering a select state in button2. This looks like a bug with using the Override CHOP option in panel2. To work around, use op(‘button2’).click in the onDone method for timer1. We have deprecated the Override CHOP parameter in panels in 099 so op(‘button2’).click is a better way to trigger the state.

Thanks for the report.

Thanks for the help…

But…Button two is unresponsive even when I use the Timer1 onDone callback, Tried both 088 and 099.

thanks!
base2.tox (4.08 KB)

timer1 and the button is actually firing otherwise you wouldn’t see the count changing, which is does as one of the 2 table entries gets updated.

There a problem with the logic however. In your setup you are triggering the chopexec1 script on offToOn and then checking logic1’s value, but because of Logic’s “Off When Zero Or Less” the Logic CHOP only cooks when its input is 1, therefore will not toggle since it won’t cook when input is 0. When you are not using/viewing the logic CHOP directly it won’t cook every frame (ie up at root looking at the component viewer).

To view this behavior, I added print statement at the beginning of your script that you can view in the Textport while its running. You can see logic1 doesn’t toggle. It’s a good habit to check your inputs in scripts like this when something isn’t working as expected.

You could append a Null set to ‘Cook Always’ to logic1, but I would recommend a different approach where you point the chopexec1 directly to logic1. Since it’s monitoring logic1, this will force logic1 to cook every frame and then give you correct data. Then instead of using only offToOn callbacks, use valueChange. This is more direct by as you are triggering the script with the same data you are comparing/using in the script. This I have setup for you in /base3 in the attached file.

Hope that helps, you have a lot of scripts to CHOPs to scripts going on there so its a bit complicated. I would probably do it all in the Timer CHOP callbacks or a single script if starting from scratch, it would be easier to debug.
baseCookingExample.2.toe (7.07 KB)

Ben thanks for the insight and the Tips! :smiley: