Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334093 - [RCP] RCP application without a status line is completely crippled when trying to use the workbench window as an IRunnableContext
Summary: [RCP] RCP application without a status line is completely crippled when tryin...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Remy Suen CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
: 357663 (view as bug list)
Depends on:
Blocks: 357666
  Show dependency tree
 
Reported: 2011-01-12 08:34 EST by Remy Suen CLA
Modified: 2011-10-26 11:45 EDT (History)
2 users (show)

See Also:


Attachments
RCP project zip (89.07 KB, application/octet-stream)
2011-01-12 08:36 EST, Remy Suen CLA
no flags Details
StatusLineManager patch v1 (7.94 KB, patch)
2011-01-12 10:14 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-01-12 08:34:39 EST
This is the extended version of bug 274554. It's not quite clear to me why no one on that bug found this to be a general problem though.

The issue here is that any RCP application that doesn't call createStatusLineControl(Composite) will face problems when they try to run things via the workbench window.

We are hitting these NPEs inadvertently in 4.1. See bug 330106 comment 7.
Comment 1 Remy Suen CLA 2011-01-12 08:36:04 EST
Created attachment 186623 [details]
RCP project zip

You can reproduce the problem with this project zip. The code of interest is ApplicationWorkbenchWindowAdvisor and MessagePopupAction.

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4091)
	at org.eclipse.swt.SWT.error(SWT.java:4006)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4059)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3678)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2642)
	at rcpmail.MessagePopupAction.run(MessagePopupAction.java:24)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	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:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4084)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3675)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2697)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2661)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2495)
	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 rcpmail.Application.run(Application.java:18)
	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.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	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: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)
Caused by: java.lang.NullPointerException
	at org.eclipse.jface.action.StatusLineManager$1.done(StatusLineManager.java:165)
	at org.eclipse.jface.operation.AccumulatingProgressMonitor$2.run(AccumulatingProgressMonitor.java:163)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 43 more
Comment 2 Remy Suen CLA 2011-01-12 10:14:53 EST
Created attachment 186641 [details]
StatusLineManager patch v1
Comment 3 Remy Suen CLA 2011-09-15 13:00:26 EDT
*** Bug 357663 has been marked as a duplicate of this bug. ***
Comment 5 Remy Suen CLA 2011-10-26 11:45:25 EDT
Verified with I20111025-0808 (3.x) and I20111025-2000 (4.x) on Windows XP.