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

**URL:** <https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052>\
**Category:** Ignition Early Access\
**Created:** [March 4, 2019, 11:57pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052 "2019-03-04T23:57:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [March 4, 2019, 11:57pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052/1 "2019-03-04T23:57:32Z")

</div>

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 😁

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:  
`{../Container.position.y}+{../Container.position.height}+10}`  
…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 🕶

---

<div class="post-metadata">

**Author:** ![joe.friedrich](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joe.friedrich/32/7505_2.png) [@joe.friedrich](https://forum.inductiveautomation.com/u/joe.friedrich)\
**Post date:** [March 5, 2019, 1:53pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052/2 "2019-03-05T13:53:38Z")

</div>

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 😄

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 5, 2019, 2:02pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052/3 "2019-03-05T14:02:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 5, 2019, 3:40pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052/4 "2019-03-05T15:40:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [March 21, 2019, 3:50pm UTC](https://forum.inductiveautomation.com/t/bug-11040-expression-bindings-are-vulnerable-to-infinite-loops/23052/5 "2019-03-21T15:50:29Z")

</div>

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.
