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

Bug 362520

Summary: [modeling] NPE while focusing diagram editor
Product: z_Archived Reporter: Benjamin Muskalla <b.muskalla>
Component: MylynAssignee: Miles Parker <milesparker>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: manuel.bork, steffen.pingel, thomas.ehrnhoefer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Benjamin Muskalla CLA 2011-10-31 14:03:10 EDT
What steps will reproduce the problem?
1. Open ecore diagram with active task
2. click "hide uninteresting elements" in main toolbar
3. click again


-- Error Details --
Date: Mon Oct 31 18:57:56 CET 2011
Message: Problems occurred when invoking code from plug-in: "org.eclipse.mylyn.context.core".
Severity: Error
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.modeling.product)
Plugin: org.eclipse.mylyn.context.core
Session Data:
eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.modeling.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.modeling.product

Exception Stack Trace:
java.lang.NullPointerException
	at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy$DecoratorTarget.addDecoration(DecorationEditPolicy.java:159)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecorator.addDecoration(ContextDecorator.java:86)
	at org.eclipse.mylyn.modeling.gmf.ui.NodeDecorator.createDecoration(NodeDecorator.java:167)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecorator.refresh(ContextDecorator.java:70)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:330)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecoratorProvider.refresh(ContextDecoratorProvider.java:298)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecoratorProvider.contextChanged(ContextDecoratorProvider.java:407)
	at org.eclipse.mylyn.modeling.gmf.ui.ContextDecoratorProvider$1.contextChanged(ContextDecoratorProvider.java:86)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager$6.run(InteractionContextManager.java:688)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalActivateContext(InteractionContextManager.java:679)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.activateContext(InteractionContextManager.java:180)
	at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$1.taskActivated(TasksUiPlugin.java:261)
	at org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.activateTask(TaskActivityManager.java:425)
	at org.eclipse.mylyn.internal.tasks.ui.commands.ActivateTaskHandler.execute(ActivateTaskHandler.java:30)
	at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.process(AbstractTaskHandler.java:80)
	at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.process(AbstractTaskHandler.java:64)
	at org.eclipse.mylyn.internal.tasks.ui.commands.AbstractTaskHandler.execute(AbstractTaskHandler.java:46)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommandInContext(HandlerService.java:270)
	at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.executeCommand(TasksUiInternal.java:1228)
	at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.activateTaskThroughCommand(TasksUiInternal.java:1274)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskListCellModifier.toggleTaskActivation(TaskListCellModifier.java:134)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView$11.mouseUp(TaskListView.java:888)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:219)
	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)
Comment 1 Steffen Pingel CLA 2012-03-13 10:04:51 EDT
Manual, was that the same bug you were seeing?
Comment 2 Miles Parker CLA 2012-03-13 13:20:57 EDT
I'll take a pass at this and see if I can reproduce but probably won't be till after EclipseCon.
Comment 3 Manuel Bork CLA 2012-03-13 13:59:06 EDT
No, the NPE I discoverd was when handling a ContextChangeEvent. I opened another bug for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=374119
Comment 4 Steffen Pingel CLA 2012-06-04 07:42:30 EDT
Miles, any progress on this?
Comment 5 Miles Parker CLA 2012-06-04 16:13:06 EDT
Taking a look. Right now it seems that there are a number of other thigns that aren't working.. :)
Comment 6 Miles Parker CLA 2012-06-04 16:49:13 EDT
I can't reproduce this.

The exception line is:

            ownerEditPart.getViewer().getVisualPartMap().put(decoration,
                ownerEditPart);

And we aren't passing anything here that might be null, so there might be some kind of internal GMF thing going on here.

Benny, are you using an Ecore Diagram? Can you see if this is still occurring and if so enclose the project? Also, check to see if there is anything unusual with your GMF install, e.g. extra components, etc..
Comment 7 Miles Parker CLA 2012-08-27 18:40:56 EDT
Marking as works for me. Benny, let me know if you see this again.