8.1.20
I discovered a bug where incorrect usage of runScript in tags can result in tags/UDTs becoming severely broken in the designer. At its worst, an entire tag provider can become permanently inaccessible. I’ll try to lay out the different failure scenarios and the implications.
Setup
The bug is caused by using runScript in an expression tag with a dataset data type. Others might be affected, but i didn’t test every type.
If runScript incorrectly calls a project library script file, rather than a function in that script, the bug is triggered. This only occurs with script files, and not packages. Example project structure:
Function within example.script, although it is inconsequential to the bug:
def func():
header = []
data = []
return system.dataset.toDataSet(header, data)
UDT
When performed on a UDT instance, the instance is enters an error state in the designer and you’ll receive an error.
UDT stack trace
java.util.concurrent.ExecutionException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.
at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagStructurePanel.loadTreeStructure(TagStructurePanel.java:840)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagStructurePanel.loadRootTag(TagStructurePanel.java:565)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagStructurePanel.reloadRootTag(TagStructurePanel.java:547)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.ComplexConfigurationTracker.load(ComplexConfigurationTracker.java:50)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.editTags(TagEditorDialog.java:727)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.refreshPaths(TagEditorDialog.java:547)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.doApplyAction(TagEditorDialog.java:363)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.applyButtonClicked(TagEditorDialog.java:349)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog$3.actionPerformed(TagEditorDialog.java:180)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:487)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:283)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:954)
at com.inductiveautomation.ignition.client.tags.impl.GatewayTagInterface$GatewayProviderProxy.lambda$readAsync$0(GatewayTagInterface.java:335)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: org.xml.sax.SAXException: java.io.EOFException
java.io.EOFException
at com.inductiveautomation.ignition.client.gateway_interface.ResponseParser.endElement(ResponseParser.java:159)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:485)
… 11 more
Caused by: java.io.EOFException
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.base/java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.base/java.io.ObjectInputStream.(Unknown Source)
at com.inductiveautomation.ignition.common.Base64.decodeToObjectFragile(Base64.java:983)
at com.inductiveautomation.ignition.common.Base64.decodeToObjectFragile(Base64.java:959)
at com.inductiveautomation.ignition.client.gateway_interface.ResponseParser.endElement(ResponseParser.java:155)
… 22 more
Ignition v8.1.20 (b2022082313)
Java: Azul Systems, Inc. 11.0.15
Refresh the tag browser, and you’ll see that the UDT is no longer browseable.
Even if the change is reverted, the tag will remain in an error state. The only recourse here is to delete the instance and recreate it without the erroneous runScript. Edit (raw) still has access to the UDT, but the overrides are not present. If JSON is copied or tag is edited, overrides are shown. Tags appear to continue working in the gateway, as tag bindings can still get live values.
If the error is made on a UDT definition, the same effect occurs on all UDT instances. Fortunately, fixing the definition will fix all instances with a tag browser refresh.
Tag
When performed on a standard tag, the entire tag provider errors in the designer.

Tag stack trace
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:487)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:283)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:954)
at com.inductiveautomation.ignition.client.tags.impl.GatewayTagInterface$GatewayProviderProxy.getDiagnosticsAsync(GatewayTagInterface.java:545)
at com.inductiveautomation.ignition.client.tags.impl.ClientTagManagerImpl.getDiagnosticsAsync(ClientTagManagerImpl.java:410)
at com.inductiveautomation.ignition.designer.tags.editing.TagDiagnosticsPanel.refreshDisplay(TagDiagnosticsPanel.java:81)
at com.inductiveautomation.ignition.designer.tags.editing.TagDiagnosticsPanel.setCurrentPath(TagDiagnosticsPanel.java:75)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.selectedModelsChanged(TagEditorDialog.java:823)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.NonComplexConfigurationTracker.finishLoading(NonComplexConfigurationTracker.java:54)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(Unknown Source)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.NonComplexConfigurationTracker.load(NonComplexConfigurationTracker.java:41)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.editTags(TagEditorDialog.java:727)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.refreshPaths(TagEditorDialog.java:547)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.doApplyAction(TagEditorDialog.java:363)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog.applyButtonClicked(TagEditorDialog.java:349)
at com.inductiveautomation.ignition.designer.tags.editing.dialog.TagEditorDialog$3.actionPerformed(TagEditorDialog.java:180)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.xml.sax.SAXException: java.io.EOFException
java.io.EOFException
at com.inductiveautomation.ignition.client.gateway_interface.ResponseParser.endElement(ResponseParser.java:159)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:485)
… 53 more
Caused by: java.io.EOFException
at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.base/java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.base/java.io.ObjectInputStream.(Unknown Source)
at com.inductiveautomation.ignition.common.Base64.decodeToObjectFragile(Base64.java:983)
at com.inductiveautomation.ignition.common.Base64.decodeToObjectFragile(Base64.java:959)
at com.inductiveautomation.ignition.client.gateway_interface.ResponseParser.endElement(ResponseParser.java:155)
… 64 more
Ignition v8.1.20 (b2022082313)
Java: Azul Systems, Inc. 11.0.15
Unlike with UDTs, fixing the expression will restore functionality to the tag provider. You need to do this before closing the tag editor, otherwise I don’t know a way to fix the issue.