Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357772

Summary: [modeling] NPE when toggeling focus button in Ecore diagram editor
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Miles Parker <milesparker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.9   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 354787    

Description Steffen Pingel CLA 2011-09-15 06:38:54 EDT
Steps:
1. Unfocus
2. Focus

Might be related to bug 357742, the stack trace on that bug also appeared.

java.lang.NullPointerException
	at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy$DecoratorTarget.addDecoration(DecorationEditPolicy.java:159)
	at org.eclipse.mylyn.modeling.gmf.ContextDecorator.addDecoration(ContextDecorator.java:86)
	at org.eclipse.mylyn.modeling.gmf.NodeDecorator.createDecoration(NodeDecorator.java:39)
	at org.eclipse.mylyn.modeling.gmf.ContextDecorator.refresh(ContextDecorator.java:70)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:318)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:286)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider$2.propertyChange(ContextDecoratorProvider.java:96)
	at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:813)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.valueChanged(ToggleModelingEditorFocusingAction.java:45)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.run(ToggleModelingEditorFocusingAction.java:39)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.runWithEvent(ToggleModelingEditorFocusingAction.java:71)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Steffen Pingel CLA 2011-09-15 06:47:26 EDT
Got this exception while toggeling focusing in a Papyrus class diagram:

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4282)
	at org.eclipse.swt.SWT.error(SWT.java:4197)
	at org.eclipse.swt.SWT.error(SWT.java:4168)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:466)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:403)
	at org.eclipse.swt.widgets.Control.getBackground(Control.java:2356)
	at org.eclipse.draw2d.LightweightSystem$RootFigure.getBackgroundColor(LightweightSystem.java:302)
	at org.eclipse.draw2d.Figure.getBackgroundColor(Figure.java:580)
	at org.eclipse.draw2d.Figure.getBackgroundColor(Figure.java:580)
	at org.eclipse.draw2d.Figure.getBackgroundColor(Figure.java:580)
	at org.eclipse.draw2d.Figure.getBackgroundColor(Figure.java:580)
	at org.eclipse.draw2d.Figure.getBackgroundColor(Figure.java:580)
	at org.eclipse.mylyn.modeling.gmf.EdgeDecorator.getMaskingColor(EdgeDecorator.java:184)
	at org.eclipse.mylyn.modeling.gmf.EdgeDecorator.unreveal(EdgeDecorator.java:161)
	at org.eclipse.mylyn.modeling.gmf.EdgeDecorator$EdgeMaskingFigure.unreveal(EdgeDecorator.java:105)
	at org.eclipse.mylyn.modeling.gmf.EdgeDecorator$EdgeMaskingFigure.<init>(EdgeDecorator.java:75)
	at org.eclipse.mylyn.modeling.gmf.EdgeDecorator.createDecoration(EdgeDecorator.java:126)
	at org.eclipse.mylyn.modeling.gmf.ContextDecorator.refresh(ContextDecorator.java:70)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:318)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:286)
	at org.eclipse.mylyn.modeling.gmf.ContextDecoratorProvider$2.propertyChange(ContextDecoratorProvider.java:96)
	at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.setValue(ScopedPreferenceStore.java:813)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.valueChanged(ToggleModelingEditorFocusingAction.java:45)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.run(ToggleModelingEditorFocusingAction.java:39)
	at org.eclipse.mylyn.internal.modeling.ui.actions.ToggleModelingEditorFocusingAction.runWithEvent(ToggleModelingEditorFocusingAction.java:71)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 2 Miles Parker CLA 2011-09-15 15:10:02 EDT
Did this happen to happen before you observed bug 357442 and within the same workbench session?
Comment 3 Steffen Pingel CLA 2011-09-15 16:08:44 EDT
I saw it another session as well but I think it always happened in conjunction with the stack trace on bug 357442. I just tried again and there was no error.
Comment 4 Miles Parker CLA 2011-09-26 23:07:41 EDT
OK, as this hasn't come up in the last couple of weeks again, I think it's been taken care of by other fixes. I can't reproduce now in any case.