Summary: | NPE during refresh on opening a diagram editor | ||
---|---|---|---|
Product: | [Modeling] Sirius | Reporter: | EPP Error Reports <error-reports-inbox> |
Component: | Diagram | Assignee: | Project Inbox <sirius.diagram-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | cedric.brun, esteban.dugueperoux, narayana.nekkanti, pierre-charles.david |
Version: | 1.0.1 | Keywords: | triaged |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
EPP Error Reports
2014-10-14 12:18:55 EDT
I've looked up the top-3 most similar bug groups and printed the closest bug of
each group below. This report may or may not be duplicate of those (low or sim-
ilar scores for all entries may indicate that this hasn't been reported yet):
> 1. Bug 446927: [sirius,gmf] Error loading SVG file (err_grp: 6b8d3940) – 255
> 2. Bug 446535: [gmf] NPE in EditPartService$ProviderDescriptor.provides (err_grp: 16dd7ed3) – 180,3
> 3. Bug 444567: Could not retrieve superclass (err_grp: 0d288e8f) – 166
If this report actually is a duplicate of those, please mark it as such. This
information helps me to improve the recommendations further for the next issue.
Thank you for your assistance.
Your friendly error-reports-inbox.
The offending line seems to be: result.addAll(Collections2.filter(DiagramComponentizationHelper.getContributedLayers(this.description, this.session.getSelectedViewpoints(false)), isMandatory)); From the context, "result" can not be null here, so the only possible cause is a null session. In that class, session is obtained from the diagram's own semantic target. Maybe it is null or an unresolved proxy. *** Bug 447152 has been marked as a duplicate of this bug. *** Steps to reproduce : 1. Disable the auto refresh preference 2. Create a Modeling Project 3. Add My.ecore 4. Enable Design Viewpoint 5. Open the automatically created "package entities" diagram 6. Create a EPackage with the palette 7. Create a new "package entites" diagram from the created EPackage with the contextual menu without saving 8. In the Ecore editor, i.e. outside Sirius Session, remove the created EPackage and save 9. Return to the first diagram, we see a red cross on the EPackage DDiagramElement to indicate that its target is detached 10. Go to the second diagram and do a refresh, press F5 or click on refresh action and the following stacktrace appears : java.lang.NullPointerException at org.eclipse.sirius.diagram.business.internal.experimental.sync.DDiagramSynchronizer.getAllMandatoriesAdditionalLayers(DDiagramSynchronizer.java:328) at org.eclipse.sirius.diagram.business.internal.experimental.sync.DDiagramSynchronizer.activateNewMandatoryAdditionalLayers(DDiagramSynchronizer.java:296) at org.eclipse.sirius.diagram.business.internal.experimental.sync.DDiagramSynchronizer.refreshOperation(DDiagramSynchronizer.java:357) at org.eclipse.sirius.diagram.business.internal.experimental.sync.DDiagramSynchronizer.refresh(DDiagramSynchronizer.java:340) at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refresh(DDiagramSynchronizer.java:91) at org.eclipse.sirius.diagram.business.internal.dialect.DiagramDialectServices.refresh(DiagramDialectServices.java:238) at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.refresh(DialectManagerImpl.java:117) at org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand.doExecute(RefreshRepresentationsCommand.java:124) at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513) at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) To fix that we should close the second diagram editor whose target is detached, in the same manner as when its target is detached in the same ResourceSet, i.e. have a popup "Deleted root element". Doing the test with a table we get the following exception : java.lang.RuntimeException at org.eclipse.sirius.tools.api.interpreter.InterpreterRegistry.getInterpreter(InterpreterRegistry.java:70) at org.eclipse.sirius.table.business.internal.dialect.TableDialectServices.refresh(TableDialectServices.java:255) at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.refresh(DialectManagerImpl.java:117) at org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand.doExecute(RefreshRepresentationsCommand.java:124) at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513) at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) at fr.obeo.dsl.viewpoint.collab.api.editingdomain.NonDirtyingCapableWorkspaceCommandStack.doExecute(NonDirtyingCapableWorkspaceCommandStack.java:68) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219) at org.eclipse.sirius.table.ui.tools.internal.editor.AbstractDTableEditor.launchRefresh(AbstractDTableEditor.java:472) at org.eclipse.sirius.ui.tools.internal.editor.AbstractDTreeEditorSessionListenerDelegate.run(AbstractDTreeEditorSessionListenerDelegate.java:58) Because on session reload for tree and table a refresh is launched, see AbstractDTreeEditorSessionListenerDelegate.run() on SessionListener.REPLACED event. After when setting focus on table editor, the popup "Deleted root element" is displayed and editor closed. I see the exception on 6.2.3 build !ENTRY org.eclipse.ui 4 0 2019-11-08 16:32:17.082 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.gef.editparts.AbstractEditPart.createChild(AbstractEditPart.java:269) at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:780) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:726) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$3(GraphicalEditPart.java:1) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$3.run(GraphicalEditPart.java:861) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refresh(GraphicalEditPart.java:851) at org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand$1.run(DeferredLayoutCommand.java:146) at org.eclipse.gmf.runtime.diagram.ui.util.EditPartUtil.synchronizeRunnableToMainThread(EditPartUtil.java:106) at org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand.doExecuteWithResult(DeferredLayoutCommand.java:186) at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) at org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68) at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCommand.java:129) at org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutCommand.executeLayoutDueToExternalChanges(SiriusCanonicalLayoutCommand.java:109) at org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutCommand.access$3(SiriusCanonicalLayoutCommand.java:106) at org.eclipse.sirius.diagram.ui.internal.refresh.layout.SiriusCanonicalLayoutCommand$1.run(SiriusCanonicalLayoutCommand.java:92) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635) 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:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) 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:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) at org.eclipse.equinox.launcher.Main.run(Main.java:1468) at org.eclipse.equinox.launcher.Main.main(Main.java:1441) |