[BUG-12823] using system.tag.configure with an invalid datatype

EDIT build: b2019022002
OS: Windows 10 Pro

If an invalid datatype is specified with system.tag.configure() the tag cannot be edited via the GUI (easily).
Deleting the invalid tag configuration also throws NPE (in gateway log).
ex. specifying “Integer” instead of “Int4”

Steps to reproduce:
-open script console via designer
-run script:

tags= {	'name':'Hello World', 
 		'tagType':'AtomicTag', 
 		'valueSource':'memory', 
 		'dataType':'Integer', # should be Int4
 		}
 system.tag.configure('', tags, 'o')

tag browser shows an error with tag configuration:
image

double click tag to edit and a blank script is shown:

output console:

> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getClassType(ConfigPropertyEditorRenderer.java:244)
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getCurrentComponent(ConfigPropertyEditorRenderer.java:382)
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getTableCellRendererComponent(ConfigPropertyEditorRenderer.java:266)
> 	at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.grid.PropertyTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.c(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicTreeTableUIDelegate.paint(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
> 	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
> 	at com.jidesoft.grid.CellStyleTable.paintComponent(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JViewport.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JSplitPane.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
> 	at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
> 	at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
> 	at java.desktop/java.awt.Container.paint(Unknown Source)
> 	at java.desktop/java.awt.Window.paint(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$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.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
> 	at java.desktop/java.awt.event.InvocationEvent.dispatch(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.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)
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getClassType(ConfigPropertyEditorRenderer.java:244)
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getCurrentComponent(ConfigPropertyEditorRenderer.java:382)
> 	at com.inductiveautomation.ignition.designer.propertyeditor.config.table.ConfigPropertyEditorRenderer.getTableCellRendererComponent(ConfigPropertyEditorRenderer.java:266)
> 	at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.grid.PropertyTable.prepareRenderer(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.c(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicTreeTableUIDelegate.paint(Unknown Source)
> 	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
> 	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
> 	at com.jidesoft.grid.CellStyleTable.paintComponent(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
> 	at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)
> 	at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$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.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
> 	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
> 	at java.desktop/java.awt.event.InvocationEvent.dispatch(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.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)

Try to delete tag and gateway logs throw NPE:

> |nodes|20Feb2019 11:18:07|Error deleting tag node '139bd8ee-9e2e-4c4e-8077-23b9263a7318'.|
> | --- | --- | --- |
> 
> |java.lang.NullPointerException: null
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.ExecutableTag.coerceAndCheck(ExecutableTag.java:221)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.ExecutableTag.valueChanged(ExecutableTag.java:254)
> at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.AbstractValueGeneratingActor.fireValueChange(AbstractValueGeneratingActor.java:41)
> at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.AbstractValueGeneratingActor.setListener(AbstractValueGeneratingActor.java:30)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.ExecutableTag.configureInvalidActor(ExecutableTag.java:402)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.ExecutableTag.destroyActors(ExecutableTag.java:344)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.ExecutableTag.deactivate(ExecutableTag.java:314)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.BasicTagDefinition.deleteInternal(BasicTagDefinition.java:210)
> at com.inductiveautomation.ignition.gateway.tags.runtime.nodes.BasicTagDefinition.delete(BasicTagDefinition.java:196)
> at com.inductiveautomation.ignition.gateway.tags.runtime.TagEvaluationManagerImpl.removeTags(TagEvaluationManagerImpl.java:225)
> at com.inductiveautomation.ignition.gateway.tags.TagProviderImpl.lambda$removeTagConfigsAsync$11(TagProviderImpl.java:614)
> at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
> 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)|

Double click tag to edit and blindly click through the GUI to change the datatype to Integer:

Apply and the tag can be deleted now.

Thanks for the report!

1 Like

This should be fixed with the nightly release from March 20.

1 Like

Confirmed it’s fixed. Thanks!

2 Likes