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

Bug 305961

Summary: NPE in org.eclipse.ui.dialogs.WizardNewFileCreationPage#isFilteredByParent
Product: [Eclipse Project] Platform Reporter: Nicolas Bros <nicolas.bros>
Component: UIAssignee: Serge Beauchamp <serge>
Status: VERIFIED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: b.muskalla, bruck.james, darin.eclipse, kathy, Kenn.Hussey, mindan.xu, paulslau, remy.suen, ruediger.herrmann, serge, Szymon.Brandys
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=297188
Whiteboard:
Bug Depends on:    
Bug Blocks: 305897    
Attachments:
Description Flags
Patch
none
Additional fix none

Description Nicolas Bros CLA 2010-03-16 04:45:54 EDT
isFilteredByParent throws a NullPointerException when it calls append() on a null containerPath. This happens when the container path is an empty string, because ContainerSelectionGroup#getContainerFullPath returns null in this case.

java.lang.NullPointerException
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.isFilteredByParent(WizardNewFileCreationPage.java:779)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.validatePage(WizardNewFileCreationPage.java:768)
at org.eclipse.gmt.modisco.infra.query.editor.presentation.QueryModelWizard$QueryModelWizardNewFileCreationPage.validatePage(QueryModelWizard.java:312)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent(WizardNewFileCreationPage.java:572)
at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.handleEvent(ResourceAndContainerGroup.java:364)
...

version: 3.6M6
Comment 1 Serge Beauchamp CLA 2010-03-16 06:26:02 EDT
Created attachment 162153 [details]
Patch
Comment 2 Serge Beauchamp CLA 2010-03-16 06:30:52 EDT
now fixed on head.
Comment 3 Paul Webster CLA 2010-03-24 10:56:09 EDT
*** Bug 306933 has been marked as a duplicate of this bug. ***
Comment 4 Remy Suen CLA 2010-03-31 06:32:12 EDT
*** Bug 307627 has been marked as a duplicate of this bug. ***
Comment 5 Darin Wright CLA 2010-04-14 14:50:13 EDT
This is happenning to me in I20100413-1521, but it looks like the fix was released a while ago? Should the bug be re-opened?

eclipse.buildId=I20100413-1521
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86


Error
Wed Apr 14 13:47:28 CDT 2010
Unhandled event loop exception

java.lang.NullPointerException
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.isFilteredByParent(WizardNewFileCreationPage.java:871)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.validatePage(WizardNewFileCreationPage.java:862)
at org.eclipse.pde.internal.ui.wizards.PDEWizardNewFileCreationPage.validatePage(PDEWizardNewFileCreationPage.java:52)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent(WizardNewFileCreationPage.java:666)
at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.handleEvent(ResourceAndContainerGroup.java:364)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2526)
at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4276)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4142)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4846)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2361)
at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4230)
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2170)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4846)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2458)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3628)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:254)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171)
at org.eclipse.ui.actions.NewWizardDropDownAction.run(NewWizardDropDownAction.java:174)
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:1050)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4039)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2416)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2380)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2229)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:504)
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: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(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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Comment 6 Darin Wright CLA 2010-04-14 14:51:35 EDT
Re-opening, I can't create a PDE Product file with the latest I-build.
Comment 7 Serge Beauchamp CLA 2010-04-14 15:15:45 EDT
Created attachment 164876 [details]
Additional fix
Comment 8 Serge Beauchamp CLA 2010-04-14 15:17:39 EDT
Fixed again for possible NPE.

Is it possible to get a reproducible case with the stock Eclipse build?
Comment 9 Darin Wright CLA 2010-04-14 15:25:31 EDT
* New > PDE > Product Configuration
* Type a letter into the "File name" field.
* BOOM
Comment 10 Serge Beauchamp CLA 2010-04-14 16:01:43 EDT
(In reply to comment #9)
> * New > PDE > Product Configuration
> * Type a letter into the "File name" field.
> * BOOM

Ok thanks.  I can confirm that this work now.
Comment 11 Remy Suen CLA 2010-04-15 13:13:47 EDT
*** Bug 309350 has been marked as a duplicate of this bug. ***
Comment 12 Paul Slauenwhite CLA 2010-04-19 13:00:38 EDT
This defect is blocking several major wizards (for example, JDT (JUnit test case/suite), PDE (Plug-in category/component definition/extension point schema), TPTP (test assets), etc.) in the latest Eclipse 3.6 integration build, which is consumed by IES.  As such, considered a blocking defect since a new Eclipse 3.6 integration build is required by the consuming product.
Comment 13 Darin Wright CLA 2010-04-26 09:03:12 EDT
*** Bug 310395 has been marked as a duplicate of this bug. ***
Comment 14 Serge Beauchamp CLA 2010-04-30 10:49:50 EDT
Verified in I20100429-1549