Tab Strip Error - Error Setting selectedTab Property

I'm getting an error that's causing issues with the startup of my navigation setup. This error does not occur when launching a client from the designer, only from the client launcher. It also does not happen every time I try to launch from the client launcher (but it does happen pretty frequently) with no changes to the project.

There are some dependent, subsequent bindings. Could that be causing the issue? How can I make sure all bindings are ready to go?

10:26:38.055 [AWT-EventQueue-0] WARN Vision.Binding.SimpleBoundTagAdapter - Error setting property to 'Phase_2B/01-Headworks/Headworks' for binding on
DockedNav.Root Container.Tier2_HEAD.selectedTab
java.lang.Exception: Error setting property to 'Phase_2B/01-Headworks/Headworks' for binding on
DockedNav.Root Container.Tier2_HEAD.selectedTab
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:333)
	at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.updateTarget(SimpleBoundTagAdapter.java:553)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:271)
	at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.notifyTagChanged(SimpleBoundTagAdapter.java:518)
	at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.tagChanged(SimpleBoundTagAdapter.java:506)
	at com.inductiveautomation.ignition.client.sqltags.impl.ChangeNotifier.run(ChangeNotifier.java:32)
	at com.inductiveautomation.ignition.client.sqltags.impl.ChangeNotifier.start(ChangeNotifier.java:45)
	at com.inductiveautomation.factorypmi.application.sqltags.ProjectTagSubscriptionManager.handleTagChanged(ProjectTagSubscriptionManager.java:165)
	at com.inductiveautomation.factorypmi.application.sqltags.ProjectTagSubscriptionManager.tagChanged(ProjectTagSubscriptionManager.java:151)
	at com.inductiveautomation.factorypmi.application.sqltags.AbstractClientTag.fireTagChange(AbstractClientTag.java:454)
	at com.inductiveautomation.factorypmi.application.sqltags.AbstractClientTag.setCurrentValue(AbstractClientTag.java:227)
	at com.inductiveautomation.factorypmi.application.sqltags.system.client.AbstractClientSystemTag._setValue(AbstractClientSystemTag.java:36)
	at com.inductiveautomation.factorypmi.application.sqltags.system.client.CurrentWindowTag.update(CurrentWindowTag.java:51)
	at com.inductiveautomation.factorypmi.application.sqltags.system.client.CurrentWindowTag.windowOpened(CurrentWindowTag.java:73)
	at com.inductiveautomation.factorypmi.application.VisionDesktop.fireWindowEvent(VisionDesktop.java:425)
	at com.inductiveautomation.factorypmi.application.VisionDesktop$InternalFrameEventRelay.internalFrameOpened(VisionDesktop.java:626)
	at java.desktop/javax.swing.JInternalFrame.fireInternalFrameEvent(Unknown Source)
	at java.desktop/javax.swing.JInternalFrame.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/javax.swing.JComponent.setVisible(Unknown Source)
	at com.inductiveautomation.factorypmi.application.VisionDesktop$RuntimeWindowOpener.openWindow(VisionDesktop.java:557)
	at com.inductiveautomation.factorypmi.application.VisionDesktop.openWindow(VisionDesktop.java:192)
	at com.inductiveautomation.factorypmi.application.VisionDesktop.openWindow(VisionDesktop.java:184)
	at com.inductiveautomation.factorypmi.application.FPMIApp.startup(FPMIApp.java:523)
	at com.inductiveautomation.factorypmi.application.runtime.ClientPanel.lambda$startupApp$8(ClientPanel.java:912)
	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)
Caused by: java.lang.NullPointerException: null
	at com.inductiveautomation.factorypmi.application.components.tabstrip.PMITabStrip.tabExistsAndIsEnabled(PMITabStrip.java:454)
	at com.inductiveautomation.factorypmi.application.components.tabstrip.PMITabStrip.setSelectedTab(PMITabStrip.java:480)
	at jdk.internal.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:326)
	... 38 common frames omitted
10:26:38.685 [AWT-EventQueue-0] WARN Vision.Binding.CellUpdateAdapter - Error setting property to 'Dataset [13R ? 24C]' for binding on
DockedNav.Root Container.Tier2_HEAD.tabData
java.lang.Exception: Error setting property to 'Dataset [13R ? 24C]' for binding on
DockedNav.Root Container.Tier2_HEAD.tabData
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:333)
	at com.inductiveautomation.factorypmi.application.binding.CellUpdateAdapter.updateTarget(CellUpdateAdapter.java:214)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:271)
	at com.inductiveautomation.factorypmi.application.binding.CellUpdateAdapter.eval(CellUpdateAdapter.java:185)
	at com.inductiveautomation.factorypmi.application.binding.CellUpdateAdapter.eval(CellUpdateAdapter.java:121)
	at com.inductiveautomation.factorypmi.application.binding.CellUpdateAdapter.lambda$new$0(CellUpdateAdapter.java:208)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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)
Caused by: java.lang.NullPointerException: null
	at com.inductiveautomation.factorypmi.application.components.tabstrip.PMITabStrip.tabExistsAndIsEnabled(PMITabStrip.java:454)
	at com.inductiveautomation.factorypmi.application.components.tabstrip.PMITabStrip.setSelectedTab(PMITabStrip.java:480)
	at com.inductiveautomation.factorypmi.application.components.tabstrip.PMITabStrip.setTabData(PMITabStrip.java:544)
	at jdk.internal.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:326)
	... 19 common frames omitted

selectedTab is bound to the currentWindow tag

You are using cell update bindings. Depending on the source, these can stick nulls into your data set (particularly for tag values). This is screwing up the tab strip.

Consider not using cell update bindings. (I avoid them like the plague.)

Ugh. I hate scripting with datasets... guess I better get better at it...

It works just fine outside of startup

If you use my Integration Toolkit module, you can construct datasets with expressions. (:

That's because tag bindings start up with nulls. You have to handle that, and handling that is near-impossible with cell update bindings.

So either learn a new thing or learn a new thing :upside_down_face: lol

I don't think (I could be wrong) the functions in the module will be particularly useful for my use case.
Scripting it is...

Seems like they do ok with bindings to bool values. Anything more complex and it starts causing issues. I figured out a way around this specific issue while still using a couple cell update bindings on the enable prop for the rows.

Because null is a falsy value. The bindings are undoubtedly firing more than once but you’re handling the null value as a false value.

I think you would be surprised. It’s free so might give it a try, the learning curve isn’t steep, and the performance is better.

2 Likes

Also worth it in general, it makes dataset manipulation much easier and manageable. I have not touched the newer expressions yet, but I still use view() heavily everywhere - makes thing a breeze for filtering or putting a column value through a function.