BUG: Weird custom bindings inside a view which keep reappearing even after deleting the view

We have a page which has a custom variable bound via scripting to return some result, as we remove the binding and the variable itself the variable keeps reappearing among the custom variables.
Even if we rename the current view and create a new one with the same name the custom variables magically reappear and we have no way to avoid them from reappearing.
We have experienced the above behaviours with several views, the only thing in common of these views is having two or three custom variables with one depending on the result of the other.

It seems as if some binding indications inside the project are linked with the page name and there is no way to remove them.
We had some success in the past with closing the project → restarting the gateway → exporting and reimporting the view and some times the problem was fixed but we still have to figure out how to rapidly fix this problem.
bug

Is there some known bug which is being worked on for this weird behaviour?

are you sure you removed all the bindings and mentions of them in scripts?
could you copy the root of the view here (should be a in json format)

also try ctrl + f and find any mention of “custom_card_config_value”

I’m positive because I just created a new View “MeterSerre” and it started creating the custom variables of its own, there are no gateway scripts which do something like this.

Here is the json of the root view:

[
  {
    "type": "ia.container.breakpt",
    "version": 0,
    "props": {
      "breakpoint": 1000
    },
    "meta": {
      "name": "root"
    },
    "position": {},
    "custom": {},
    "children": [
      {
        "type": "ia.display.view",
        "version": 0,
        "props": {
          "params": {
            "instances": []
          }
        },
        "meta": {
          "name": "EmbeddedView"
        },
        "position": {},
        "custom": {},
        "propConfig": {
          "props.path": {
            "binding": {
              "config": {
                "path": "session.custom.domain.currentSelectedSiteId"
              },
              "transforms": [
                {
                  "fallback": null,
                  "inputType": "scalar",
                  "mappings": [
                    {
                      "input": 283,
                      "output": "Custom/146/MeterSerre_desktop"
                    },
                    {
                      "input": 284,
                      "output": "Custom/146/MeterSerre_desktop"
                    }
                  ],
                  "outputType": "scalar",
                  "type": "map"
                }
              ],
              "type": "property"
            }
          }
        }
      },
      {
        "type": "ia.display.view",
        "version": 0,
        "props": {},
        "meta": {
          "name": "EmbeddedView_0"
        },
        "position": {
          "size": "large"
        },
        "custom": {}
      }
    ]
  }
]

the name “custom_card_config_value” is found in another view which has bindings using the same variable name but I doubt this could influence my “MeterSerre” view.

it sure looks empty for now yea, can you copy it when these custom things appear again?

Ok, one caveat: the custom variable appears in the custom area of the View and not of the “root” component.

Ok I created a new View with the incriminated name “MeterSerre”, here is the copy paste of the JSON respectively of the view:

{"type":"view","payload":{"view":{"path":"Custom/146/MeterSerre","width":800.0,"height":800.0,"params":{}}}}

and of its root component:

[
  {
    "type": "ia.container.breakpt",
    "version": 0,
    "props": {},
    "meta": {
      "name": "root"
    },
    "position": {},
    "custom": {}
  }
]

they seem very empty but again, as soon as I open the designer the variables pop up:

ah its in the view, you will have to chenk the resources then.

can you look for view.json file in this folder (on the gateway)? (you will have to browser the file explorer to find it, it should probably look something like this depending where you installed ingition.
C:\Program Files\Inductive Automation\Ignition\data\projects\ProjectName\com.inductiveautomation.perspective\views\Custom\146\MeterSerre\view.json

Here is the copy paste of the view.json:

{
  "custom": {
    "key": "value"
  },
  "params": {},
  "propConfig": {
    "custom.key": {
      "persistent": true
    }
  },
  "props": {},
  "root": {
    "meta": {
      "name": "root"
    },
    "type": "ia.container.breakpt"
  }
}

by the way in the mean time the custom variables don’t appear anymore when I reopen the designer and open the “MeterSerre” view, but I’m sure the problem is still there and will happen again in a few days frustrating us for some more hours.

Errata Corrige: it’s happening again, the view.json is still the same!

if they still reappear then it has to be some script somewhere… as there doenst seem to be any mention of a binding with those names inside the resource files.

the view.json wont update untill you save the project again, so it really s a script triggering it somewhere

Ok I asked for the help of a colleague and we troubleshooted and found the following:

  • If I created from my designer a new View with a different name “Pluto” the custom variables were created nevertheless so the problem is not limited to the name “MeterSerre” and it cannot be a script of ours because we never used the name “Pluto” for any view before.
  • My colleague opened from his designer the view “Pluto” but his custom variables are empty so the problem seems to be local to my designer.
  • The problem happened to him before with his designer which is older than mine so it’s not specific to my computer or my version of the designer.
  • opening and closing the designer has no effect on the problem but rebooting my computer and reopening the designer solved it for the moment.

All the above for us points to a bug with the designer which keeps some sort of cache of the bindings and for some mysterious reason sporadically behaves as described.
I hope someone from Inductive Automation can chime in to solve this issue.

ignition_version

Above my current version of the designer, notice this happened also with previous versions of the designer.

very weird, you should contact support directly then i suppose instead of ask on the forum, you’ll get a reply faster that way

I will contact our italian distributor to see if he can get in touch with IA regarding this matter, in the meantime I wanted to see if anyone on the forum had maybe a solution or similar experience.
Thank you victor for your support.

i have had properties reapear because of a binding. but i dont see one in your view :confused: So i guess it has to be somethingnelse

What happens if you use the Find/Replace tool to look for instances of “custom_card”, “instance_meter”, and “card_instances”? Please make sure you’re looking in ALL Views and all of the Scripting areas. outside of Vision If this project is the child of a different project, then you might also need to look in the parent project.

Ok, I unconsciously stirred the entire development team here and we probably found the underlying bug, I’ll try to explain:

let’s say we have a binding on View1 which is an expression where one value is bound to a session variable “now_5_sec” which changes every 5 seconds: we need this to refresh every 5 seconds the configuration for reasons I need not explain (it would open a new topic which is not the point now).
Below a screenshot of such a binding:

bug1

this session variable by the way is defined as in the screenshot below:

bug2

Because the binding in View1 executes as soon as you open it in the designer the following happens: I open View1 and the binding starts writing to the variable custom_card_config in View1 every 5 seconds, I now create a new View2 keeping the other view running and the View2 is being populated
with the result of the other view which is running in the background.

We are quite confindent this is the problem because we can reproduce it with the above steps and we can kinda see how one script executing in one view could spoil another view if the designer doesn’t check for the view where it is currently executing.

I hope the above is clear, otherwise I can make a video.

What you’re describing is a known issue which has actually just been resolved in the last few days. I only remember it being present when both views had the same property names, but regardless of replication steps the fix is present in the 8.1.11 nightly available now.

2 Likes

Our problem happens regardless of property names, the first views writes it’s property names to the second view due to this property bound to a now(5000) expression.
I’ll take a look at the nightly build to see if the problem is solved and post an update here.
Thank you

Ok tested 8.1.11 nightly build and the bug is solved, hope this will make up quickly to LTS.
Thank you