Why does the tag provider crash with this expression?

Hi, I am using an expression tag in ignition. In the expression I have written is:
" tag("[.]") "
This makes the tag provider become unavailable.
Is this because of some kind of infinite loop?

Yes.

What result were you hoping for with that expression?

The expression is not finished, but since it crashed, I gave up doing it that way.
What I actually wanted was to read the value of a tag in the same folder. The plan was to do something like:
tag("[.]/../siblingTag")
But I did not get it to work.
I need to use a string for the relative path to be able to change it through code later.

What version of Ignition are you using? I can't reproduce a crash or infinite loop.

I am using Ignition 8.1.27
The datatype was string.
What about this expression: tag("[.]/..")

No, same nonsense value, but no crash:

image

This is what the error looks like when the expression is tag("[.]"):
CrashInTagprovider_Zoomed

Try using this UDT:
{
"name": "testUDT",
"tagType": "UdtType",
"tags": [
{
"valueSource": "reference",
"name": "New Tag",
"tagType": "AtomicTag"
}
]
}

And this instance of it:
{
"name": "New Instance",
"typeId": "testUDT",
"tagType": "UdtInstance",
"tags": [
{
"valueSource": "expr",
"expression": "tag("[.]")",
"dataType": "String",
"name": "New Tag",
"tagType": "AtomicTag"
}
]
}

Ok, that your expression tag was nested in a UDT instance was a relevant detail.

I'll file a bug report.

2 Likes