| Summary: | Intro Support and NullPointerException (CVS) | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Markus Krüger <webmaster> |
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | 1.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Markus Krüger
The NPE occurs as there is no intro available. But this is the default workbench behavior. The same NPE happens in RCP if you try to add the intro action without having an intro available. See also bug 211184: [Intro] [IntroAction] Causes NullPointerException when product intro binding no set https://bugs.eclipse.org/bugs/show_bug.cgi?id=211184 I see that the NPE is not nice but I don't think we should work around existing RCP bugs unless they get fixed. And it doesn't make much sense to have an intro action without an intro. Closing this as WONTFIX. Feel free to reopen in case the bug in Platform/UI gets fixed so we may adopt their changes. I now also get this sometimes if I re-enter the URL so that my app restarts! osgi> 2009-06-25 12:18:15.139::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2009-06-25 12:18:15.217::INFO: jetty-6.1.x 2009-06-25 12:18:15.467::INFO: Started SelectChannelConnector@0.0.0.0:8181 java.lang.NullPointerException at org.eclipse.ui.internal.IntroAction.<init>(IntroAction.java:64) at org.eclipse.ui.actions.ActionFactory$10.create(ActionFactory.java:342) at ag.ion.rap.base.internal.ui.ApplicationActionBarAdvisor.makeActions(ApplicationActionBarAdvisor.java:54) at org.eclipse.ui.application.ActionBarAdvisor.fillActionBars(ActionBarAdvisor.java:147) at org.eclipse.ui.internal.WorkbenchWindow.fillActionBars(WorkbenchWindow.java:3394) at org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:363) at org.eclipse.ui.internal.tweaklets.Workbench3xImplementation.createWorkbenchWindow(Workbench3xImplementation.java:29) at org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workbench.java:1765) at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1763) at org.eclipse.ui.internal.Workbench$16.runWithException(Workbench.java:1043) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:115) at org.eclipse.swt.widgets.Display$2.run(Display.java:695) at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:460) at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44) at org.eclipse.swt.widgets.Display.syncExec(Display.java:693) at org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExceptions(StartupThreading.java:55) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:1041) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1888) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1824) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:188) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:790) at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1430) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:115) at org.eclipse.swt.widgets.Display$2.run(Display.java:695) at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:460) at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44) at org.eclipse.swt.widgets.Display.syncExec(Display.java:693) at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1425) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2406) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2295) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:514) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:497) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157) at ag.ion.rap.base.internal.ui.BaseRAPApplication.createUI(BaseRAPApplication.java:43) at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:231) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:119) at java.lang.Thread.run(Thread.java:595) !SESSION 2009-06-25 12:18:13.640 ----------------------------------------------- eclipse.buildId=unknown java.version=1.5.0_15 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -dev file:P:/workspaces/axionNFMWeb/.metadata/.plugins/org.eclipse.pde.core/ag.ion.axion.nfm.rap.fastcalc.ui/dev.properties -os win32 -ws win32 -arch x86 -console -consolelog !ENTRY org.eclipse.rap.ui 4 0 2009-06-25 13:51:39.921 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.IntroAction.<init>(IntroAction.java:64) at org.eclipse.ui.actions.ActionFactory$10.create(ActionFactory.java:342) at ag.ion.rap.base.internal.ui.ApplicationActionBarAdvisor.makeActions(ApplicationActionBarAdvisor.java:54) at org.eclipse.ui.application.ActionBarAdvisor.fillActionBars(ActionBarAdvisor.java:147) at org.eclipse.ui.internal.WorkbenchWindow.fillActionBars(WorkbenchWindow.java:3394) at org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:363) at org.eclipse.ui.internal.tweaklets.Workbench3xImplementation.createWorkbenchWindow(Workbench3xImplementation.java:29) at org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workbench.java:1765) at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1763) at org.eclipse.ui.internal.Workbench$16.runWithException(Workbench.java:1043) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:115) at org.eclipse.swt.widgets.Display$2.run(Display.java:695) at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:460) at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44) at org.eclipse.swt.widgets.Display.syncExec(Display.java:693) at org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExceptions(StartupThreading.java:55) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:1041) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1888) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1824) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:188) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:790) at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1430) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) at org.eclipse.rwt.internal.lifecycle.UICallBackManager.addSync(UICallBackManager.java:115) at org.eclipse.swt.widgets.Display$2.run(Display.java:695) at org.eclipse.rwt.internal.lifecycle.UICallBackServiceHandler.runNonUIThreadWithFakeContext(UICallBackServiceHandler.java:460) at org.eclipse.rwt.lifecycle.UICallBack.runNonUIThreadWithFakeContext(UICallBack.java:44) at org.eclipse.swt.widgets.Display.syncExec(Display.java:693) at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1425) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2406) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2295) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:514) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:497) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157) at ag.ion.rap.base.internal.ui.BaseRAPApplication.createUI(BaseRAPApplication.java:43) at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:231) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:119) at java.lang.Thread.run(Thread.java:595) Markus, I'd love to do something about it but do you have any idea how to reproduce this? Hmmm, might have been fixed somehow as I can not reproduce this anymore, for now. If it occurs again, I'll get back to this. Ok, now I get this one again.
I have an application with an intro and an intro action to show the intro (of course :-) ). just adding the plugin "org.eclipse.rap.design.example" to my plugin and calling the servlet /business causes the error. The intro is not added to the brandings used in the design example which seems to be the root cause. But this means, that just adding a plugin with a branding and whitout an intro causes this branding not to work.
I think this should be fixed as calling the intro action (after i fixed the NullPointerException temporary) show the correct info that no intro is available. But the application still work!
Just change the code to:
if(introDescriptor != null) {
String labelOverride = introDescriptor.getLabelOverride();
if (labelOverride != null)
setText(labelOverride);
}
Calling register(ActionFactory.INTRO.create(window)); in ActionBarAdvisor caused the behavior, so surrounding is by an if clause like "if (window.getWorkbench().getIntroManager().hasIntro())" will result in an working app, but I still think my suggested fix should be applied to the caller has not to care about it. Markus, I don't see that we should touch the workbench code in order to fix this. In RCP the behavior is the same if you're switching products that are not associated with the intro. Closing this as WONTFIX, please reopen if I'm wrong. |