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

Bug 311202

Summary: NPE in PresentationContext outside Debug perspective
Product: [Eclipse Project] Platform Reporter: Benjamin Muskalla <b.muskalla>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, pawel.1.piech
Version: 3.6Flags: pawel.1.piech: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch none

Description Benjamin Muskalla CLA 2010-04-30 12:03:28 EDT
What steps will reproduce the problem?
1. While debugging
1.1 Switch perspective to anything else than Debug
2. Select expression (eg. status.getSeverity() ) 
3. Hit Ctrl+I


-- Error Details --
Date: Fri Apr 30 17:37:06 CEST 2010
Message: Unhandled event loop exception
Severity: Error
Product: Eclipse SDK 3.6.0.v201004242000 (org.eclipse.sdk.ide)
Plugin: org.eclipse.ui
Session Data:
eclipse.buildId=I20100424-2000
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -server -showLocation
Command-line arguments:  -os linux -ws gtk -arch x86 -server -showLocation


Exception Stack Trace:
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3162)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2601)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2565)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2399)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:669)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:662)
	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(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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Caused by: java.lang.NullPointerException
	at org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext.<init>(PresentationContext.java:80)
	at org.eclipse.debug.ui.InspectPopupDialog.createDialogArea(InspectPopupDialog.java:104)
	at org.eclipse.jface.dialogs.PopupDialog.createContents(PopupDialog.java:678)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.PopupDialog.open(PopupDialog.java:1088)
	at org.eclipse.debug.ui.DebugPopup.open(DebugPopup.java:203)
	at org.eclipse.jdt.internal.debug.ui.actions.PopupInspectAction.showPopup(PopupInspectAction.java:68)
	at org.eclipse.jdt.internal.debug.ui.actions.PopupInspectAction$1.run(PopupInspectAction.java:44)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 22 more
Comment 1 Darin Wright CLA 2010-05-04 10:55:14 EDT
*** Bug 311565 has been marked as a duplicate of this bug. ***
Comment 2 Darin Wright CLA 2010-05-04 22:29:18 EDT
Created attachment 167070 [details]
patch
Comment 3 Darin Wright CLA 2010-05-04 22:29:42 EDT
Please review, Pawel.
Comment 4 Pawel Piech CLA 2010-05-05 00:41:13 EDT
Ouch!  I was quickly trying to reproduce it (unsuccessfully) without looking closely at the code.  Thanks!
Comment 5 Darin Wright CLA 2010-05-05 09:02:50 EDT
Applied/Fixed.