Community
Participate
Working Groups
Since upgrading to Eclipse 3.2RC2 from Eclipse 3.1.2, my application now gets a NullPointerException from the org.eclipse.ui.intro plugin. In particular, the title text of our intro page is null. This causes the method org.eclipse.ui.internal.intro.impl.model.IntroText::getText() to pass null to the resolveVariables method, which promptly throws the NullPointerException. Here is the callstack trace: !SESSION 2006-05-05 09:05:45.132 ----------------------------------------------- eclipse.buildId=unknown java.version=1.5.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product com.arc.cdt.toolchain.ide -pdelaunch Command-line arguments: -product com.arc.cdt.toolchain.ide -data C:\Documents and Settings\davidp\mide\demo-workspace -dev file:C:/workspace/.metadata/.plugins/org.eclipse.pde.core/Run-time Workbench/dev.properties -pdelaunch -debug C:\workspace\.metadata\.plugins\org.eclipse.pde.core\Run-time Workbench/.options -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.ui 4 4 2006-05-05 15:16:58.366 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 2006-05-05 15:16:58.381 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.intro.impl.model.IntroModelRoot.resolveVariables(IntroModelRoot.java:850) at org.eclipse.ui.internal.intro.impl.model.IntroText.getText(IntroText.java:51) at org.eclipse.ui.internal.intro.impl.model.IntroPageTitle.getTitle(IntroPageTitle.java:32) at org.eclipse.ui.internal.intro.impl.html.IntroHTMLGenerator.generateIntroTitle(IntroHTMLGenerator.java:551) at org.eclipse.ui.internal.intro.impl.html.IntroHTMLGenerator.generateIntroElement(IntroHTMLGenerator.java:270) at org.eclipse.ui.internal.intro.impl.html.IntroHTMLGenerator.generateBodyElement(IntroHTMLGenerator.java:228) at org.eclipse.ui.internal.intro.impl.html.IntroHTMLGenerator.generateHTMLElement(IntroHTMLGenerator.java:100) at org.eclipse.ui.internal.intro.impl.html.IntroHTMLGenerator.generateHTMLforPage(IntroHTMLGenerator.java:67) at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.generateDynamicContentForPage(BrowserIntroPartImplementation.java:203) at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.dynamicStandbyStateChanged(BrowserIntroPartImplementation.java:434) at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.doStandbyStateChanged(BrowserIntroPartImplementation.java:641) at org.eclipse.ui.internal.intro.impl.model.AbstractIntroPartImplementation.standbyStateChanged(AbstractIntroPartImplementation.java:249) at org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation.standbyStateChanged(IntroPartPresentation.java:438) at org.eclipse.ui.intro.config.CustomizableIntroPart.standbyStateChanged(CustomizableIntroPart.java:263) at org.eclipse.ui.internal.ViewIntroAdapterPart$2.run(ViewIntroAdapterPart.java:74) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.ViewIntroAdapterPart.setStandby(ViewIntroAdapterPart.java:70) at org.eclipse.ui.internal.ViewIntroAdapterPart$1.propertyChanged(ViewIntroAdapterPart.java:55) at org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:346) at org.eclipse.ui.internal.WorkbenchPartReference.fireZoomChange(WorkbenchPartReference.java:511) at org.eclipse.ui.internal.PartPane.setZoomed(PartPane.java:333) at org.eclipse.ui.internal.PartStack.setZoomed(PartStack.java:1233) at org.eclipse.ui.internal.PartSashContainer.zoomIn(PartSashContainer.java:879) at org.eclipse.ui.internal.PartSashContainer.childRequestZoomIn(PartSashContainer.java:900) at org.eclipse.ui.internal.LayoutPart.requestZoomIn(LayoutPart.java:354) at org.eclipse.ui.internal.PartStack.childRequestZoomIn(PartStack.java:1183) at org.eclipse.ui.internal.LayoutPart.requestZoomIn(LayoutPart.java:354) at org.eclipse.ui.internal.PerspectiveHelper.zoomIn(PerspectiveHelper.java:1315) at org.eclipse.ui.internal.WorkbenchPage.setState(WorkbenchPage.java:3549) at org.eclipse.ui.internal.WorkbenchPage.toggleZoom(WorkbenchPage.java:3610) at org.eclipse.ui.internal.WorkbenchIntroManager.setIntroStandby(WorkbenchIntroManager.java:200) at org.eclipse.ui.internal.WorkbenchIntroManager.showIntro(WorkbenchIntroManager.java:135) at org.eclipse.ui.application.WorkbenchWindowAdvisor.openIntro(WorkbenchWindowAdvisor.java:172) at org.eclipse.ui.internal.ide.IDEWorkbenchWindowAdvisor.openIntro(IDEWorkbenchWindowAdvisor.java:424) at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:676) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:803) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1437) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1435) at org.eclipse.ui.internal.Workbench$16.run(Workbench.java:1399) at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1421) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1397) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:190) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:708) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1085) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
An RC4 candidate.
Confirmed - all that is needed is to place an empty element for the title: <title style-id="intro-header"></title> The fix is trivial - we need to short-circuit the null argument. The fix is attached as a patch.
Created attachment 40662 [details] The fix for the Welcome NPE.
Wassim, need your +1 for this defect.
McQ, need a vote as per RC4 rules of engagement.
+1. Fix is trivial and localized.
For voters, the fix above is probably as sweet as it gets for RC4 - we missed a case where the text passeed to the method could be NULL in rare cases. Barfing it out in immediately is the right thing to do and solves this problem. Eclipse does not see this problem because it is unusual to specify the title element but leave it empty, and we have non-null titles.
+1
Released.