[Bug-11040]Expression Bindings Are Vulnerable To Infinite Loops

So I don’t know if this qualifies as a bug, since it’s clearly my own mistake, but I just thought I’d flag it in case it warrants protecting users from themselves :grin:

I have one container on a view that has an expression binding on the height, so that it sizes itself to the number of options available for the particular data instance I’m looking at.

Then, I want two buttons to sit 10 pixels below this container, automatically repositioning as the container re-sizes. So I selected both buttons and clicked the y position binding button, and added a simple expression, along the lines of:
…which would have all worked fine, if I hadn’t have also inadvertently selected the container itself, along with the buttons. So now, the container has a y position binding that continuously tells itself to be 10 pixels below where it currently is. It reached 20 million pixels in a matter of seconds, and I couldn’t open the binding window to fix it (timeout error). I can’t see an obvious way to remove the binding without opening the window, and pasting a different binding onto it didn’t seem to work either.

Eventually I had to just close the view without saving, losing all my changes up to that point (but thankfully, including the infinite loop binding).

As I say, I’m happy to accept that this is likely a PICNIC error and warrants no further action, but just thought I’d flag it in case there’s an easy way to enable binding removal/disabling without having to open the dialog, to help in a situation like this :sunglasses:


You might have been able to copy the JSON of the view into a text editor, find and remove the script, and paste the new JSON into a New View.
Or a New Project… that would probably be safer :smile:

Infinite loops are not just a Perspective problem. There’s lots of ways to get them in Vision, too. Complete lock-up included. /-:

1 Like

Yes, I opened a ticket regarding this a long while ago and it’s sort of been delayed again and again in favor of stability fixes, but I had seen it making progress over the last few days, so should be tackled soon.

In the instance it does occur, you’re right - there’s no way to fix it short of closing the View. A short-term workaround would be to remove the binding from the View’s json file.

1 Like

This issue was fixed in the build that was uploaded today (3/21).
Please let us know if you continue to see this behavior after upgrading.

1 Like