Error starting up module Perspective - Resource does not contain style definition

I started getting this error when saving a project yesterday, and today when I launched the designer, Perspective was missing and I saw this in the designer console, below. Not sure how to fix it. How can I find what resource has the issue?

Yesterday I noticed that I couldn't open up a couple of style classes; double clicking on them just did nothing, whereas others would open as normal. I'm looking now in their style.json and they look ok from the file perspective.

Also, a Perspective client session starts up normally. The project is only skeleton at the moment, but I can't see anything amiss.

22:26:29.151 [Designer-Startup] ERROR designer.main -- Error starting up module Perspective
java.lang.IllegalArgumentException: Resource does not contain style definition.
	at com.inductiveautomation.perspective.common.config.styles.StyleClassConfig.fromProjectResource(StyleClassConfig.java:62)
	at com.inductiveautomation.perspective.designer.DesignerHook$StyleChangeListener.toCss(DesignerHook.java:788)
	at com.inductiveautomation.perspective.designer.DesignerHook$StyleChangeListener.lambda$compileStyleClasses$1(DesignerHook.java:770)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at com.inductiveautomation.perspective.designer.DesignerHook$StyleChangeListener.compileStyleClasses(DesignerHook.java:767)
	at com.inductiveautomation.perspective.designer.DesignerHook$StyleChangeListener.<init>(DesignerHook.java:758)
	at com.inductiveautomation.perspective.designer.DesignerHook.startup(DesignerHook.java:262)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$LoadedModule.startup(IgnitionDesigner.java:2052)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.startupModule(IgnitionDesigner.java:1232)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner.loadProject(IgnitionDesigner.java:1022)
	at com.inductiveautomation.ignition.designer.IgnitionDesigner$StartupProjectDialogHandler.lambda$new$2(IgnitionDesigner.java:2102)
	at java.base/java.lang.Thread.run(Unknown Source)

I found and "fixed" this issue (and now getting another one) by searching through the Perspective style-class folders and found one folder that had a "resource.json" and no referenced "style.json", and another folder that had a "resource.json" and a "data.bin" instead of a style.json. Not sure why a style class resource would ever have a data.bin :grimacing: Unfortunately automatic backups weren't configured so I have nothing to compare the gateway against from when it was working.

Now Perspective shows up in the Designer, however nothing is showing under Perspective in the project browser, and I'm getting another error:

09:21:33.662 [Designer-Startup] INFO designer.main -- Initializing UI... [+6356]
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.inductiveautomation.perspective.designer.workspace.ViewWorkspace.setSelectedIndex(int)" because the return value of "java.util.function.Supplier.get()" is null
	at com.inductiveautomation.perspective.designer.PerspectiveNavNode.onSelected(PerspectiveNavNode.java:32)
	at com.inductiveautomation.ignition.designer.navtree.model.AbstractNavTreeNode.dispatchSelectionEvent(AbstractNavTreeNode.java:835)
	at com.inductiveautomation.ignition.designer.navtree.NavTreePanel$SelectionListener.valueChanged(NavTreePanel.java:564)
	at java.desktop/javax.swing.JTree.fireValueChanged(Unknown Source)
	at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
	at java.desktop/javax.swing.JTree.setSelectionPath(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(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 com.jidesoft.docking.DockingUtils.a(Unknown Source)
	at com.jidesoft.docking.DefaultDockingManager.handleEvent(Unknown Source)
	at com.jidesoft.docking.DefaultDockingManager$a3.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.desktop/java.awt.Toolkit.notifyAWTEventListeners(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(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.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(Unknown Source)
	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(Unknown Source)
	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 am also seeing this behavior. I'll try and get to the bottom of it but it's a completely new one to me.