Bug 489303 - Legacy tabs sometimes activated in the wrong context, causing crashes
Summary: Legacy tabs sometimes activated in the wrong context, causing crashes
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1.0   Edit
Assignee: Project Inbox CLA
QA Contact: Julien Dupont CLA
URL: https://tuleap.eclipse.org/plugins/tr...
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 495366
  Show dependency tree
 
Reported: 2016-03-09 11:21 EST by Pierre-Charles David CLA
Modified: 2016-10-18 11:07 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2016-03-09 11:21:46 EST
Steps to reproduce, with Sirius-defined properties views installed/enabled.

1. Make sure the properties view is visible.
2. Create a plain (non-Modeling) projet with a sample.ecore inside (it probably works the same with a Modeling project, but I have not tested).
3. Create a new representation file (sample.aird) for the Ecore, and enable the "Design" viewpoint from "Ecore Tools" .
4. Select the sample.ecore from the Model Explorer. The properties view shows 'No properties available', OK.
5. Create a new diagram on the root EPackage in the ecore. The diagrams opens, and we have the expected tabs in the properties view (the "General" one from default rules, and the legacy ones).
6. Close the diagram and select again the sample.ecore in the Model Explorer. 4 identical exceptions are thrown (see below), which seem to indicate that the legacy bridge considers that the GMF-provided legacy are applicable to the element, but calls them in an invalid context.

java.lang.NullPointerException
	at org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection.setInput(AdvancedPropertySection.java:167)
	at org.eclipse.sirius.diagram.ui.tools.api.properties.MiscPropertySection.setInput(MiscPropertySection.java:129)
	at org.eclipse.eef.properties.ui.legacy.internal.legacy2eef.EEFLegacySection.setInput(EEFLegacySection.java:151)
	at org.eclipse.eef.properties.ui.api.EEFTabContents$2.run(EEFTabContents.java:117)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.eef.properties.ui.api.EEFTabContents.setInput(EEFTabContents.java:120)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage.processSelectionChanged(EEFTabbedPropertySheetPage.java:507)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage.access$0(EEFTabbedPropertySheetPage.java:482)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage$1.selectionChanged(EEFTabbedPropertySheetPage.java:239)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer.fireSelectionChanged(EEFTabbedPropertyViewer.java:117)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer.access$1(EEFTabbedPropertyViewer.java:115)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer$1.widgetSelected(EEFTabbedPropertyViewer.java:99)
Comment 1 Pierre-Charles David CLA 2016-06-20 11:30:14 EDT
I can't reproduce this anymore on current master. Reducing the severity but not closing yet, as there is no obvious link to a particular change that whould have fixed it. I'd like to understand the initial issue a little more before considering it fixed.
Comment 2 Pierre-Charles David CLA 2016-09-07 10:19:56 EDT
I still can't reproduce it. I don't have time to hunt the actual commit which fixed it, but it is probably among the legacy support fixes done on the EEF side.
Comment 3 Pierre-Charles David CLA 2016-10-18 11:07:32 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.