Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 225912 - [Patch] NPE when trying to create a patch in a non-existing directory
Summary: [Patch] NPE when trying to create a patch in a non-existing directory
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-06 15:31 EDT by Steffen Pingel CLA
Modified: 2008-04-30 07:57 EDT (History)
1 user (show)

See Also:


Attachments
screenshot (35.63 KB, image/png)
2008-04-08 16:29 EDT, Steffen Pingel CLA
no flags Details
Patch (6.51 KB, patch)
2008-04-10 09:20 EDT, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (15.34 KB, application/octet-stream)
2008-04-10 09:20 EDT, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2008-04-06 15:31:39 EDT
I tried to create a patch from the synchronize perspective using "Create Patch". The dialog defaulted to a path that had been deleted in the meantime. Clicking "Next" logged the exception below to the error log.

Using Eclipse 3.4M6

-- Error Log --
Date: Sun Apr 06 11:26:58 GMT-08:00 2008
Message: Unhandled event loop exception
Severity: Error
Plugin ID: org.eclipse.ui
Stack Trace:
java.lang.NullPointerException
	at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.performFinish(GenerateDiffFileWizard.java:1498)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1145)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3346)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2982)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard.run(GenerateDiffFileWizard.java:80)
	at org.eclipse.team.internal.ccvs.ui.mappings.CreatePatchAction.execute(CreatePatchAction.java:101)
	at org.eclipse.team.internal.ccvs.ui.mappings.CVSModelProviderAction.run(CVSModelProviderAction.java:129)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1145)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3346)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2982)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2375)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2339)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2205)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:478)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:473)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	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:362)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Comment 1 Tomasz Zarna CLA 2008-04-08 10:09:33 EDT
Steffen, I'm having problems with reproducing it on the build I've got here (N20080404-2000). If I'm trying to create a patch using a deleted path for the File I get "The specified directory does not exist." message. When I'm trying to do the same thing for the Workspace option I get the page opened with the Clipboard option selected. Am I missing something? AFAIK, we haven't made recently any changes to the wizard.
Comment 2 Steffen Pingel CLA 2008-04-08 16:01:40 EDT
When I try now I can't reproduce it anymore myself. I'll comment here in case I get the wizard into the state again that caused the exception. This can probably be closed as worksforme for now.
Comment 3 Steffen Pingel CLA 2008-04-08 16:29:47 EDT
Created attachment 95266 [details]
screenshot
Comment 4 Steffen Pingel CLA 2008-04-08 16:32:18 EDT
On a second attempt I was able to reproduce it (see screenshot):

1. create a "File" patch in a directory that exists
2. delete the directory
3. open the create patch dialog
4. toggle the selection in the changes section
Comment 5 Tomasz Zarna CLA 2008-04-09 04:29:58 EDT
Got it!
Comment 6 Tomasz Zarna CLA 2008-04-10 09:20:01 EDT
Created attachment 95520 [details]
Patch
Comment 7 Tomasz Zarna CLA 2008-04-10 09:20:04 EDT
Created attachment 95521 [details]
mylyn/context/zip
Comment 8 Tomasz Zarna CLA 2008-04-10 09:21:58 EDT
Here you go, Steff. Would you like to verify it?
Comment 9 Steffen Pingel CLA 2008-04-14 17:06:27 EDT
Verified patch against head of org.eclipse.team.cvs.ui. Thanks!
Comment 10 Tomasz Zarna CLA 2008-04-15 03:56:15 EDT
Released to HEAD.
Comment 11 Tomasz Zarna CLA 2008-04-30 07:57:51 EDT
Verified by Steffen in comment 9 and by me through code inspection.