| Summary: | CCE or NPE during some diagram opening without "refresh at opening" | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Laurent Redor <laurent.redor> | ||||||||||||||||
| Component: | Diagram | Assignee: | Florian Barbin <florian.barbin> | ||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Laurent Redor <laurent.redor> | ||||||||||||||||
| Severity: | major | ||||||||||||||||||
| Priority: | P3 | CC: | florian.barbin, laurent.fasani, steve.monnier | ||||||||||||||||
| Version: | 4.1.0 | Keywords: | triaged | ||||||||||||||||
| Target Milestone: | 5.1.4 | ||||||||||||||||||
| Hardware: | All | ||||||||||||||||||
| OS: | All | ||||||||||||||||||
| See Also: |
https://git.eclipse.org/r/132682 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7f8dfd96be7ce7449b2a19357d84a6a4f7e2fe8f https://git.eclipse.org/r/133172 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f177417cd2a5f7429a5128ae53b777754f2c14c0 |
||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | |||||||||||||||||||
| Bug Blocks: | 541555 | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Created attachment 265199 [details]
ModelingProjectB_before.zip
Created attachment 265200 [details]
fullStackOfClassCastException.txt
Created attachment 265201 [details]
ModelingProjectA_after.zip
Created attachment 265202 [details]
ModelingProjectA_before.zip
Created attachment 265203 [details]
fullStackOfNullPointerException.txt
Created attachment 265204 [details]
ModelingProjectA_after.zip
I reproduced both issue with the samples. These issues will be fixed in a next version. Finally, this issue will not be fixed. The model is corrupted with a customer action and it is not in an expected state. Even if the detected exceptions would be fixed, there are probably other similar exceptions in Sirius code as it does not expect a model in this state. I reopen it since we will finally make a fix in case of CCE or NPE. If this kind of issue occurs during the diagram opening, we will invite the user to perform a refresh and reopen the diagram. New Gerrit change created: https://git.eclipse.org/r/132682 Gerrit change https://git.eclipse.org/r/132682 was merged to [v5.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7f8dfd96be7ce7449b2a19357d84a6a4f7e2fe8f New Gerrit change created: https://git.eclipse.org/r/133172 Gerrit change https://git.eclipse.org/r/133172 was merged to [v5.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f177417cd2a5f7429a5128ae53b777754f2c14c0 validated with T4C1.2.2 Available in Sirius 5.1.4, see https://wiki.eclipse.org/Sirius/5.1.4 for details. |
Created attachment 265198 [details] ModelingProjectB_after.zip In some circumstance, the diagram can have GMF nodes without element. The Sirius code does not expect these cases and there is some ClassCastException or NullPointerException during the EditParts initialization. If the refresh at opening is enabled, there is no problem because the refresh cleans the orphan nodes before the EditParts initialization. Steps to reproduce: * Open the project ModelingProjectB_after from ModelingProjectB_after.zip * Disable the automatic refresh preferences ("Preferences/Sirius/Do refresh on representation opening"=false and "Preferences/Sirius/Automatic Refresh"=false) * Open the diagram "new Diag" * KO: A message is display in the diagram "Failed to create the part's controls". And as details, we can see this log: java.lang.ClassCastException: org.eclipse.sirius.diagram.business.internal.metamodel.spec.DNodeContainerSpec cannot be cast to org.eclipse.sirius.diagram.WorkspaceImage at org.eclipse.sirius.diagram.ui.internal.edit.parts.WorkspaceImageEditPart.createNodeShape(WorkspaceImageEditPart.java:127) at org.eclipse.sirius.diagram.ui.internal.edit.parts.WorkspaceImageEditPart.createNodeFigure(WorkspaceImageEditPart.java:186) at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.createFigure(ShapeNodeEditPart.java:90) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:494) at org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart.addChildVisual(BorderedBorderItemEditPart.java:88) The full stack is available in fullStackOfClassCastException.txt. The project ModelingProjectB_after has been "build" from ModelingProjectB_before. The modifications have been made manually in the aird file as we don't know currently how the customer got in this situation. The problem can be slightly different if a label is displayed for border node. Steps to reproduce: * Open the project ModelingProjectA_after from ModelingProjectA_after.zip * Disable the automatic refresh preferences ("Preferences/Sirius/Do refresh on representation opening"=false and "Preferences/Sirius/Automatic Refresh"=false) * Open the diagram "new Diag" * KO: A message is display in the diagram "Failed to create the part's controls". And as details, we can see this log: java.lang.NullPointerException at org.eclipse.sirius.diagram.ui.edit.api.part.DiagramNameEditPartOperation.refreshFont(DiagramNameEditPartOperation.java:123) at org.eclipse.sirius.diagram.ui.edit.api.part.DiagramNameEditPartOperation.refreshFont(DiagramNameEditPartOperation.java:92) at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramNameEditPart.refreshFont(AbstractDiagramNameEditPart.java:111) at org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractGeneratedDiagramNameEditPart.refreshVisuals(AbstractGeneratedDiagramNameEditPart.java:358) at org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeNameEditPart.refreshVisuals(DNodeNameEditPart.java:115) at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:725) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644) The full stack is available in fullStackOfNullPointerException.txt. The project ModelingProjectB_after has been "build" from ModelingProjectB_before.