Ignition V8.1.38. Perspective Designer. I have been able to replicate this, but not reliably.
I created a label object on my perspective display with 2 custom properties. During design, I had some trouble with a query binding on the first property where I forgot to change the return format to JSON. It was left to Auto and was returning a dataset. While trying to figure out why I wasn't able to see the proper data returned, I was playing around with the properties structure changing different components between array and object, but at one point left it set to value. When I realized my mistake, I changed the return type to JSON, and a whole new custom property created itself, basically duplicating itself. I deleted the original property from the object, and didn't think anything else about it.
The next day, I came in and checked my logs. I saw a slew of "ExecutionQueue Uncaught Throwable during execution." warnings in there. The log wasn't much help in identifying the problem component or binding.
java.lang.IllegalArgumentException: Malformed path: 0
at com.inductiveautomation.ignition.common.JsonPath.parse(JsonPath.java:242)
at com.inductiveautomation.perspective.gateway.property.PropertyTree.write(PropertyTree.java:547)
at com.inductiveautomation.perspective.gateway.model.ElementBindingHarness.writeToTarget(ElementBindingHarness.java:60)
at com.inductiveautomation.perspective.gateway.model.AbstractBindingHarness.valueReady(AbstractBindingHarness.java:379)
at com.inductiveautomation.perspective.gateway.model.AbstractBindingHarness.lambda$processValue$0(AbstractBindingHarness.java:248)
at com.inductiveautomation.ignition.common.util.TimedRunnable.run(TimedRunnable.java:21)
at com.inductiveautomation.ignition.common.util.ExecutionQueue$PollAndExecute.run(ExecutionQueue.java:239)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
I saw another post related to what I was seeing [IGN-11148]Locating script errors from Wrapper log - #8 by nminchin and did some more digging. I found it was related to this label. I deleted the object from my screen and recreated my label correctly, and the warnings stopped. Before I deleted it, I did copy the object and paste its code into a text editor.
[
{
"type": "ia.display.label",
"version": 0,
"props": {},
"meta": {
"name": "NextJobIDLabel"
},
"position": {
"x": 565,
"y": 112,
"width": 200,
"height": 32
},
"custom": {},
"propConfig": {
"custom.LastID": {
"binding": {
"type": "query",
"config": {
"returnFormat": "scalar",
"queryPath": "GetNextJobID"
}
}
},
"custom.NextID": {
"binding": {
"type": "expr",
"config": {
"expression": "{this.custom.LastID} + 1\r\n"
}
}
},
"custom.0": {
"binding": {
"type": "query",
"config": {
"returnFormat": "json",
"queryPath": "GetNextJobID"
}
}
},
"props.text": {
"binding": {
"type": "expr",
"config": {
"expression": "\"Next Job ID = \" + {this.custom.NextID}"
}
}
}
}
}
]
Of note in there is the custom.0 property. That is the one that I deleted from the designer. There are no warnings in the designer about it, and I never would have found that without the text editor and a lot of trial and error. Custom.LastID is the proper custom property with the scalar return format, but custom.0 retained the JSON return format. If I paste the object back into my project, the logs now show the same error, but they tell me the project name and view that the warning is occurring in.
The easiest way for me to replicate something close to what I originally experienced is to create a custom property, bind it to a query with JSON return format (mine returns three values). It should change to the structure to an array with an object with 3 values. Change the Structure of that property to a value. Then open the binding dialog again. Change the return format to Scalar, apply the changes, change it back to JSON, apply the changes and the custom.0 property appears. If you delete it from the list in the designer, it disappears as does the warning, but pasting the code for the button reveals that the custom property is still there. In my first example it was custom.0, in my recreation it became custom['0'].