Exception occurs sometimes while closing a workbench instance with a diagram editor open
The IDiagram
provided to ElementPainter.onDiagramSet
is null
in these cases.
java.lang.UnsupportedOperationException: ILookupService not supported by root node null attained from UnboundedNode (5552) [#child=0] [z=10, transform=AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]] [visible=true]
at org.simantics.scenegraph.utils.NodeUtil.getLookupService(NodeUtil.java:784)
at org.simantics.scenegraph.utils.NodeUtil.lookup(NodeUtil.java:834)
at org.simantics.g2d.diagram.participant.ElementPainter.getSelectionsNode(ElementPainter.java:917)
at org.simantics.g2d.diagram.participant.ElementPainter.getSelectionsNode(ElementPainter.java:927)
at org.simantics.g2d.diagram.participant.ElementPainter.paintSelection(ElementPainter.java:991)
at org.simantics.g2d.diagram.participant.ElementPainter.updateSelections(ElementPainter.java:863)
at org.simantics.g2d.diagram.participant.ElementPainter.updateAll(ElementPainter.java:681)
at org.simantics.g2d.diagram.participant.ElementPainter.onDiagramSet(ElementPainter.java:254)
at org.simantics.g2d.diagram.participant.AbstractDiagramParticipant._setDiagram(AbstractDiagramParticipant.java:121)
at org.simantics.g2d.diagram.participant.AbstractDiagramParticipant.removedFromContext(AbstractDiagramParticipant.java:72)
at org.simantics.g2d.diagram.participant.ElementPainter.removedFromContext(ElementPainter.java:198)
at org.simantics.g2d.canvas.impl.CanvasContext$2.itemRemoved(CanvasContext.java:107)
at org.simantics.g2d.canvas.impl.CanvasContext$2.itemRemoved(CanvasContext.java:1)
at jdk.internal.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.simantics.utils.threads.SyncListenerList$2.run(SyncListenerList.java:289)
at org.simantics.utils.threads.ThreadUtils.multiSyncExec(ThreadUtils.java:374)
at org.simantics.utils.threads.ThreadUtils.multiSyncExec(ThreadUtils.java:302)
at org.simantics.utils.datastructures.context.Context.clear(Context.java:125)
at org.simantics.g2d.canvas.impl.CanvasContext$4.run(CanvasContext.java:184)
at org.simantics.utils.threads.ThreadUtils.syncExec(ThreadUtils.java:243)
at org.simantics.g2d.canvas.impl.CanvasContext.doDispose(CanvasContext.java:181)
at org.simantics.utils.datastructures.disposable.AbstractDisposable.dispose(AbstractDisposable.java:71)
at org.simantics.modeling.ui.diagramEditor.DiagramViewer$ChassisListener$1.run(DiagramViewer.java:410)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Edited by Tuukka Lehtonen