Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 262397 - Error Dialog Throws Exception
Summary: Error Dialog Throws Exception
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.2 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-26 11:48 EST by Austin Riddle CLA
Modified: 2009-05-12 11:02 EDT (History)
0 users

See Also:


Attachments
Sample Project Illustrating Behavior (372.47 KB, application/octet-stream)
2009-01-26 11:48 EST, Austin Riddle CLA
no flags Details
Fix (1.14 KB, patch)
2009-02-16 04:28 EST, Vasko Tchoumatchenko CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin Riddle CLA 2009-01-26 11:48:20 EST
Created attachment 123765 [details]
Sample Project Illustrating Behavior

Build ID: CVS HEAD

Steps To Reproduce:
We have been tracking this exception in our server logs since the M4 release, and we have finally been able to reproduce it.

I am not sure of all of the cases that you could reproduce this in, but if you throw an exception from a JFACE label provider during normal calls to getText() (etc.).  You will get the following exception:
==============================================
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:2572)
	at org.eclipse.swt.SWT.error(SWT.java:2492)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.processNextRunnableInUIThread(UICallBackManager.java:167)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.readAndDispatch(RWTLifeCycle.java:246)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:684)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:807)
	at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1335)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:135)
	at org.eclipse.swt.widgets.Display$2.run(Display.java:651)
	at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:455)
	at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:649)
	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1330)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309)
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2200)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:425)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:408)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
	at bugdemo.Application.createUI(Application.java:75)
	at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:229)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:116)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.refreshSingleStatusArea(WorkbenchStatusDialogManager.java:1948)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.updateTitleArea(WorkbenchStatusDialogManager.java:2199)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.refresh(WorkbenchStatusDialogManager.java:1931)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.access$32(WorkbenchStatusDialogManager.java:1924)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager$5.run(WorkbenchStatusDialogManager.java:1069)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager$RunnableBase.run(UICallBackManager.java:50)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.processNextRunnableInUIThread(UICallBackManager.java:165)
	... 23 more

	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager$5.run(WorkbenchStatusDialogManager.java:1069)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager$RunnableBase.run(UICallBackManager.java:50)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.processNextRunnableInUIThread(UICallBackManager.java:165)
	... 23 more

===========================================
Another version we get is:

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:2572)
	at org.eclipse.swt.SWT.error(SWT.java:2492)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.processNextRunnableInUIThread(UICallBackManager.java:167)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.afterPhaseExecution(RWTLifeCycle.java:406)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLifeCycle(RWTLifeCycle.java:191)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:117)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.refreshSingleStatusArea(WorkbenchStatusDialogManager.java:1948)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.updateTitleArea(WorkbenchStatusDialogManager.java:2199)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.refresh(WorkbenchStatusDialogManager.java:1931)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.access$32(WorkbenchStatusDialogManager.java:1924)
	at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager$5.run(WorkbenchStatusDialogManager.java:1069)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager$RunnableBase.run(UICallBackManager.java:50)
	at org.eclipse.rwt.internal.lifecycle.UICallBackManager.processNextRunnableInUIThread(UICallBackManager.java:165)
	... 4 more

======================================================

The attached project illustrates the behavior.
Comment 1 Benjamin Muskalla CLA 2009-02-02 07:59:59 EST
This is a Platform bug:

238738: [StatusHandling] Still an NPE in WorkbenchStatusDialogManager.refreshSingleStatusArea(..)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238738

This will be fixed when we adopt the new platform code. In the meantime you could use the patch attached to the original bug report.
Not sure whether we commit the patch to our codebase.
Comment 2 Vasko Tchoumatchenko CLA 2009-02-16 04:28:39 EST
Created attachment 125760 [details]
Fix

The patch from [Bug 238738] ported to RAP CVS HEAD.
Comment 3 Rüdiger Herrmann CLA 2009-02-16 07:12:26 EST
Committed the patch from Vasko