Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #580424 +++ The Sirius Session Details property page (available in right-click contextual menu > Properties of .aird files) throws the following NPE when representations without target are present in the session: > java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.ecore.EObject.eClass()" because "this.eObject" is null > at org.eclipse.sirius.model.business.internal.query.EObjectQuery.getGenericDecription(EObjectQuery.java:326) > at org.eclipse.sirius.business.api.query.EObjectQuery.getGenericDecription(EObjectQuery.java:361) > at org.eclipse.sirius.business.internal.query.SessionDetailsReport.addRepresentationDescriptorExtendedInfo(SessionDetailsReport.java:310) > at org.eclipse.sirius.business.internal.query.SessionDetailsReport.lambda$9(SessionDetailsReport.java:178) > at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) > at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) > at org.eclipse.sirius.business.internal.query.SessionDetailsReport.addRepresentationsInformation(SessionDetailsReport.java:176) > at org.eclipse.sirius.business.internal.query.SessionDetailsReport.getSessionFormattedInformation(SessionDetailsReport.java:125) > at org.eclipse.sirius.ui.business.internal.session.SiriusSessionDetailsPropertyPage.getSessionInformation(SiriusSessionDetailsPropertyPage.java:100) > at org.eclipse.sirius.ui.business.internal.session.SiriusSessionDetailsPropertyPage$3.run(SiriusSessionDetailsPropertyPage.java:177) > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Sirius representations can detected/categorized as invalid when * they have a dangling target (null, proxy or not found in the session) * the representation cannot be reached from its descriptor: no repPath, or no representation at location pointed by the repPath. The invalid representations are grayed in the ui. They are also tagged with [invalid] tag in the SessionDetailsReport result which is displayed in the .aird properties (from contextual menu). In some tools like Team for Capella, this result is also used for project checks/report during automatic backup.
Created attachment 288648 [details] 580424-Sirius6.6.0.zip Step to reproduce/validate * Open the attached project * Open the session * Right click the .aird and then click on the Properties menu * Select the Sirius Session Details tab * You must have no NPE Notes: * repDesc can be manually corrupted to remove target, repPath or representation * in Capella or other advanced workbenches based on Sirius, user cannot get a representation descriptor by simple actions : Delete action is hooked with impact analysis and automatic deletion of Diagram/Tables whose target is being deleted.
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/194900
Gerrit change https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/194900 was merged to [v6.7.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c4014c1f4d02f583c6d83d40140d7e65eb6c876b