Bug 512466 - [tool] widget disposed exception
Summary: [tool] widget disposed exception
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: tool (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 17:32 EST by Ernesto Posse CLA
Modified: 2017-02-23 11:56 EST (History)
4 users (show)

See Also:


Attachments
Sample model (7.76 KB, application/zip)
2017-02-20 17:32 EST, Ernesto Posse CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernesto Posse CLA 2017-02-20 17:32:22 EST
When editing the properties of a port on a part where the part if inherited, a "Widget is disposed" exception is thrown.

Steps to reproduce
==================

1. Create a UML-RT model
2. Add three capsules Capsule1, Capsule2 and Capsule3
3. Add a port protocol1 to Capsule3
4. Add a part capsule3 of type Capsule3 to Capsule1
5. Add a Generalization from Capsule2 to Capsule1
6. In Capsule2's diagram select the port-on-a-part protocol1 from capsule3
7. In the properties view, change the conjugation

See also the attached sample model.

Expected result
===============

The conjugation of the port is change in Capsule3

Actual result
=============

The conjugation is changed, but it also throws the exception below.

Environment
===========

commit d85e4f4d4d27dd783c1ae0ae79414549b5d3ceb4

macOS 10.12.3
Eclipse Neon.2


Exception trace
===============

null
org.eclipse.core.databinding
Error
Mon Feb 20 17:22:57 EST 2017
An error occurred while setting the value.

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4533)
	at org.eclipse.swt.SWT.error(SWT.java:4448)
	at org.eclipse.swt.SWT.error(SWT.java:4419)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:799)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:588)
	at org.eclipse.swt.widgets.Button.setGrayed(Button.java:761)
	at org.eclipse.papyrus.infra.widgets.databinding.GrayedCheckboxObservableValue.doSetValue(GrayedCheckboxObservableValue.java:68)
	at org.eclipse.core.databinding.observable.value.AbstractObservableValue.setValue(AbstractObservableValue.java:66)
	at org.eclipse.core.databinding.UpdateValueStrategy.doSet(UpdateValueStrategy.java:469)
	at org.eclipse.core.databinding.ValueBinding$3$1.run(ValueBinding.java:206)
	at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:149)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:153)
	at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:171)
	at org.eclipse.core.databinding.ValueBinding$3.run(ValueBinding.java:196)
	at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:149)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:153)
	at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:171)
	at org.eclipse.core.databinding.ValueBinding.doUpdate(ValueBinding.java:158)
	at org.eclipse.core.databinding.ValueBinding.access$4(ValueBinding.java:147)
	at org.eclipse.core.databinding.ValueBinding$2.handleValueChange(ValueBinding.java:56)
	at org.eclipse.core.databinding.observable.value.ValueChangeEvent.dispatch(ValueChangeEvent.java:70)
	at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:117)
	at org.eclipse.papyrus.infra.tools.databinding.DelegatingObservable.fireEvent(DelegatingObservable.java:304)
	at org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableValue$1.handleValueChange(DelegatingObservableValue.java:114)
	at org.eclipse.core.databinding.observable.value.ValueChangeEvent.dispatch(ValueChangeEvent.java:70)
	at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:117)
	at org.eclipse.core.databinding.observable.value.AbstractObservableValue.fireValueChange(AbstractObservableValue.java:82)
	at org.eclipse.emf.databinding.EObjectObservableValue.access$0(EObjectObservableValue.java:1)
	at org.eclipse.emf.databinding.EObjectObservableValue$1$1.run(EObjectObservableValue.java:108)
	at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:149)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:153)
	at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:171)
	at org.eclipse.emf.databinding.EObjectObservableValue$1.notifyChanged(EObjectObservableValue.java:104)
	at org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotify(ElementImpl.java:1012)
	at org.eclipse.papyrusrt.umlrt.uml.internal.impl.PortRTImpl.setIsConjugated(PortRTImpl.java:493)
	at org.eclipse.papyrusrt.umlrt.uml.internal.impl.PortRTImpl.eSet(PortRTImpl.java:193)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1071)
	at org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand.doExecuteWithResult(SetValueCommand.java:74)
	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.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
	at org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper.execute(GMFtoEMFCommandWrapper.java:121)
	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:488)
	at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.doExecute(CheckedOperationHistory.java:206)
	at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.execute(CheckedOperationHistory.java:195)
	at org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack.doExecute(NotifyingWorkspaceCommandStack.java:264)
	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.papyrus.infra.emf.gmf.command.NestingNotifyingWorkspaceCommandStack.execute(NestingNotifyingWorkspaceCommandStack.java:130)
	at org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableValue.doSetValue(PapyrusObservableValue.java:89)
	at org.eclipse.core.databinding.observable.value.AbstractObservableValue.setValue(AbstractObservableValue.java:66)
	at org.eclipse.papyrus.infra.tools.databinding.DelegatingObservableValue.setValue(DelegatingObservableValue.java:104)
	at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.papyrus.infra.tools.databinding.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:160)
	at com.sun.proxy.$Proxy34.setValue(Unknown Source)
	at org.eclipse.core.databinding.UpdateValueStrategy.doSet(UpdateValueStrategy.java:469)
	at org.eclipse.core.databinding.ValueBinding$3$1.run(ValueBinding.java:206)
	at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:149)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:153)
	at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:171)
	at org.eclipse.core.databinding.ValueBinding$3.run(ValueBinding.java:196)
	at org.eclipse.core.databinding.observable.Realm$1.run(Realm.java:149)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.databinding.observable.Realm.safeRun(Realm.java:153)
	at org.eclipse.core.databinding.observable.Realm.exec(Realm.java:171)
	at org.eclipse.core.databinding.ValueBinding.doUpdate(ValueBinding.java:158)
	at org.eclipse.core.databinding.ValueBinding.access$4(ValueBinding.java:147)
	at org.eclipse.core.databinding.ValueBinding$1.handleValueChange(ValueBinding.java:46)
	at org.eclipse.core.databinding.observable.value.ValueChangeEvent.dispatch(ValueChangeEvent.java:70)
	at org.eclipse.core.databinding.observable.ChangeManager.fireEvent(ChangeManager.java:117)
	at org.eclipse.core.databinding.observable.value.AbstractObservableValue.fireValueChange(AbstractObservableValue.java:82)
	at org.eclipse.papyrus.infra.widgets.databinding.GrayedCheckboxObservableValue.widgetSelected(GrayedCheckboxObservableValue.java:95)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Comment 1 Ernesto Posse CLA 2017-02-20 17:32:46 EST
Created attachment 266908 [details]
Sample model
Comment 2 Peter Cigehn CLA 2017-02-21 04:28:35 EST
I have been seeing lots of these "Widget is disposed" exceptions, in several different situations, but have never been able to get a good repeatable test case for any of them (and thus I have not written any bugs for it yet). I had hoped that this case was repeatable, but when opening the attached model in the latest Papyrus-RT I am unable to get it to repeat at first (as I was afraid). Simply jumping to step 6 and toggling the conjugation does not throw the exception. 

I then tried clicking around selecting some out elements, toggling conjugation on the other port on the capsule part, and then all of a sudden I was starting to get the exceptions as soon as I toggled conjugation. I then tried to repeat, but what I thought was the same sequence of selecting different elements in the diagram (capsule frame, connector, other port on capsule part, capsule part itself and so on), it did not repeat again. Continued clicking on elements, toggling conjugation, and all of a sudden the exception started to occur again.

There seem to be some aspect of selecting different elements, and then all of a sudden this exception start to occurs. But it is really hard to find a repeatable sequence that always trigger the exception. Eventually when the exception have started occuring, it repeats over and over each time you toggle the conjugation.

I have tested on Windows so this is an issue that seem to be possible to be repeated both on Windows and macOS.
Comment 3 Patrik Nandorf CLA 2017-02-21 04:30:41 EST
And Linux/Ubuntu
Comment 4 Charles Rivet CLA 2017-02-23 11:56:26 EST
Need a consistent way to reproduce.