Bug 489302 - IllegalArgumentException when selecting the "Rulers and Grids" legacy GMF tab
Summary: IllegalArgumentException when selecting the "Rulers and Grids" legacy GMF tab
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.1.0   Edit
Assignee: Project Inbox CLA
QA Contact: Julien Dupont CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 495366
  Show dependency tree
 
Reported: 2016-03-09 11:11 EST by Pierre-Charles David CLA
Modified: 2016-10-18 11:09 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:11:14 EST
With the Sirius-defined properties views installed/enabled:

1. Open a Sirius diagram.
2. Select the diagram itself (not an element inside of it).
3. In the properties view, select the "Rulers and Grid" legacy GMF tab:

java.lang.IllegalArgumentException
	at org.eclipse.core.runtime.ListenerList.add(ListenerList.java:113)
	at org.eclipse.core.commands.common.EventManager.addListenerObject(EventManager.java:58)
	at org.eclipse.jface.preference.PreferenceStore.addPropertyChangeListener(PreferenceStore.java:106)
	at org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection.initWorkspacePropertyListener(RulerGridPropertySection.java:883)
	at org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection.setInput(RulerGridPropertySection.java:624)
	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:534)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage.access$0(EEFTabbedPropertySheetPage.java:508)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage$1.selectionChanged(EEFTabbedPropertySheetPage.java:247)
	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)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242)
Comment 1 Stephane Begaudeau CLA 2016-03-29 08:58:22 EDT
In the GMF RulerGridPropertySection, the following lifecycle is not supported:

- new section
- section#setInput
- section#dispose
- section#setInput again

I have not yet identified why after the call to dispose we are still manipulating the object and not creating a new instance of this object if we need one.
Comment 2 Stephane Begaudeau CLA 2016-03-29 09:18:22 EDT
I don't know why yet but calling EEFTabbedPropertyRegistry#getTabDescriptors(part, selection) can return EEFSectionDescriptors containing references to previously disposed EEFSection.
Comment 3 Eclipse Genie CLA 2016-03-29 10:03:30 EDT
New Gerrit change created: https://git.eclipse.org/r/69438
Comment 5 Pierre-Charles David CLA 2016-06-09 09:42:06 EDT
I believe this was actually fixed for 4.0 by the commit referenced above, but the ticket was not close so it was not verified.
Comment 6 Pierre-Charles David CLA 2016-06-20 11:02:53 EDT
Confirmed fixed on master, and was probably already OK for 4.0.
Comment 7 Pierre-Charles David CLA 2016-10-18 11:09:19 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.