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

Bug 335167

Summary: NPE while selecting model elements
Product: [Modeling] Papyrus Reporter: Klaas Gadeyne <klaas.gadeyne>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: stolz+bugzilla
Version: 0.7.1   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Project that shows the behaviour none

Description Klaas Gadeyne CLA 2011-01-24 05:43:39 EST
Created attachment 187407 [details]
Project that shows the behaviour

I sometimes get this NPE when selecting elements in a basic papyrus Model (example attached).  Version 0.7.2 (not available in bugzilla yet it seems)

java.lang.NullPointerException
	at org.eclipse.papyrus.diagram.common.handlers.GraphicalCommandHandler.isEnabled(GraphicalCommandHandler.java:101)
	at org.eclipse.papyrus.diagram.common.providers.ActionStateSourceProvider.testDeleteFromDiagram(ActionStateSourceProvider.java:78)
	at org.eclipse.papyrus.diagram.common.providers.ActionStateSourceProvider.refreshDeleteAction(ActionStateSourceProvider.java:62)
	at org.eclipse.papyrus.diagram.common.providers.ActionStateSourceProvider.refreshActions(ActionStateSourceProvider.java:88)
	at org.eclipse.papyrus.diagram.common.providers.AbstractActionStateSourceProvider$SelectionListener.selectionChanged(AbstractActionStateSourceProvider.java:266)
	at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
	at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider$1.run(MultiPageSelectionProvider.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider.fireEventChange(MultiPageSelectionProvider.java:110)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageSelectionProvider.fireSelectionChanged(MultiPageSelectionProvider.java:92)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageEditorSite.handleSelectionChanged(MultiPageEditorSite.java:463)
	at org.eclipse.papyrus.sasheditor.internal.eclipsecopy.MultiPageEditorSite$3.selectionChanged(MultiPageEditorSite.java:385)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:269)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:247)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

Eclipse data:

eclipse.buildId=M20100909-0800
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.modeling.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product
Comment 1 Volker Stolz CLA 2011-06-15 06:28:31 EDT
Got this one as well in an activity diagram in 0.7.2.
Comment 2 Camille Letavernier CLA 2013-03-25 08:51:04 EDT
Fixed in the current version (0.10M6)