NullPointerException when opening a different project in the Designer and closing a project

I’ve recently upgraded from 7.9 to 8.1.17. I’m checking over some Vision projects and every time I open a new project, I’m getting a NullPointerException. I also get an NPE when closing the Designer and it doesn’t actually close. I have to actually use the Task Manager to kill the Java process.

I don’t see anything in the release notes for 8.1.18 or .19 that seems relevant, so I’m not sure if upgrading will help.

This is the error when trying to open a new project:

java.lang.NullPointerException
	at com.inductiveautomation.ignition.client.model.AbstractClientContext.shutdown(AbstractClientContext.java:102)
	at com.inductiveautomation.ignition.designer.DesignerContextImpl.shutdown(DesignerContextImpl.java:450)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.cleanup(IgnitionDesigner.java:933)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.loadProject(IgnitionDesigner.java:944)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.loadProject(IgnitionDesigner.java:911)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$Handler$1.openProject(IgnitionDesigner.java:2200)
	at com.inductiveautomation.ignition.designer.ProjectDialog.lambda$openProject$4(ProjectDialog.java:156)
	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)

Ignition v8.1.17 (b2022051210)
Java: Azul Systems, Inc. 11.0.15

And here is the error from the console when I try to close the Designer:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.inductiveautomation.ignition.client.model.AbstractClientContext.shutdown(AbstractClientContext.java:102)
	at com.inductiveautomation.ignition.designer.DesignerContextImpl.shutdown(DesignerContextImpl.java:450)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.cleanup(IgnitionDesigner.java:933)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.shutdown(IgnitionDesigner.java:509)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$Handler.handleExit(IgnitionDesigner.java:3068)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$Handler$12.actionPerformed(IgnitionDesigner.java:2425)
	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.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.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)

I’m guessing what’s going wrong is that the local client/designer doesn’t have access to a directory under the local user that we’re trying to use to store thread dumps when the client or designer detects the ‘event dispatch thread’ is hung. That’s the only way I could see the thing that’s null ending up null. You should contact support, they can walk you through the process of troubleshooting those file connection errors.

I recently ran into this issue after corrupting my local user folder. I went with the slash and burn strategy and deleted the hidden .ignition folder in my user folder and reinstalled then everything started behaving normal again. This is similar to this FAQ from IA https://support.inductiveautomation.com/hc/en-us/articles/360047596071-How-to-Clear-Client-ignition-Cache-and-Java-Cache

A watchout is to make sure one pulls backup configs for the designer, vision, and perspective clients so you don't have to reconfigure those