SCLChildRule and VariablePropertyCategoryRule getParent returns null invalidly
ChildRule.getParent
is not allowed to return null
. However, SCLChildRule and VariablePropertyCategoryRule do exactly that which leads to BrowseContext NPE failures at runtime.
ERROR [2021-10-15 14:37:15,852] fi.vtt.apros.ui.diagram.handlers.ShowInBrowser: getParents failed
java.lang.NullPointerException: null
at org.simantics.browsing.ui.model.children.ChildContribution.getParents(ChildContribution.java:152)
at org.simantics.browsing.ui.model.browsecontexts.BrowseContext.getParents(BrowseContext.java:347)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser$1.perform(ShowInBrowser.java:49)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser$1.perform(ShowInBrowser.java:1)
at fi.vtt.simantics.procore.internal.SessionImplSocket$6.run0(SessionImplSocket.java:1521)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at fi.vtt.simantics.procore.internal.SessionRequestManager$1.run0(SessionRequestManager.java:127)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:238)
Wrapped by: org.simantics.db.exception.DatabaseException: Unexpected exception
at fi.vtt.simantics.procore.internal.SessionImplSocket.syncRequest(SessionImplSocket.java:1850)
at fi.vtt.simantics.procore.internal.SessionImplSocket.syncRequest(SessionImplSocket.java:2953)
at org.simantics.db.common.request.UniqueRead.request(UniqueRead.java:60)
at fi.vtt.simantics.procore.internal.SessionImplSocket.sync(SessionImplSocket.java:2220)
at org.simantics.Simantics.sync(Simantics.java:389)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser.getParents(ShowInBrowser.java:45)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser.show(ShowInBrowser.java:65)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser$ShowRunnable.run(ShowInBrowser.java:156)
at fi.vtt.apros.ui.diagram.handlers.ShowInBrowser.execute(ShowInBrowser.java:113)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:438)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:449)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:475)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.simantics.workbench.internal.SimanticsWorkbenchApplication.start(SimanticsWorkbenchApplication.java:156)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)