This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 418683 - AFE on trying to create a patch
Summary: AFE on trying to create a patch
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-04 10:14 EDT by Noopur Gupta CLA
Modified: 2013-10-29 11:59 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2013-10-04 10:14:20 EDT
1. Download eclipse-SDK-I20131001-0800-win32-x86_64.
2. Open Eclipse on a new workspace.
3. Go to Help > Install New Software and install "Eclipse Git Team Provider" (3.1.0.201310021548-r) via http://download.eclipse.org/egit/updates.
4. Go to Git perspective and add any existing local git Repo.
5. Select the repo and click link with editor in History view.
6. Select any existing commit, right-click > Create Patch.
7. In 'Create Patch' dialog, select 'File' and click on Finish. 
I am getting this exception in Error Log view and the patch is not getting created:
org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:364)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1051)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard.performFinish(GitCreatePatchWizard.java:164)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:851)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:436)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:633)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4351)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.egit.ui.internal.history.GitCreatePatchWizard.run(GitCreatePatchWizard.java:114)
	at org.eclipse.egit.ui.internal.patch.PatchOperationUI.start(PatchOperationUI.java:96)
	at org.eclipse.egit.ui.internal.history.command.CreatePatchHandler.execute(CreatePatchHandler.java:31)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:214)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:837)
	at org.eclipse.ui.menus.CommandContributionItem.access$21(CommandContributionItem.java:823)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:813)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4351)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:144)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:613)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Comment 1 Dani Megert CLA 2013-10-04 10:35:36 EDT
> 4. Go to Git perspective and add any existing local git Repo.

Does it work if you clone a shared repo, e.g.
ssh://git.eclipse.org/gitroot/platform/eclipse.platform.text.git
?
Comment 2 Noopur Gupta CLA 2013-10-04 12:06:21 EDT
(In reply to Dani Megert from comment #1)
> Does it work if you clone a shared repo, e.g.
> ssh://git.eclipse.org/gitroot/platform/eclipse.platform.text.git
> ?

I get the same issue with a newly cloned repo also.
Comment 3 Dani Megert CLA 2013-10-07 09:12:48 EDT
Not good! The problem is that the progress monitor is 'null'. This is not an EGit specific issue but a problem in the WizardDialog caused by wrong fix for bug 19462. I've reverted that change.
Comment 4 Robin Stocker CLA 2013-10-09 18:39:36 EDT
Such an NPE could still occur currently, as WizardDialog#getProgressMonitor is allowed to return null. Proposed fix:

https://git.eclipse.org/r/17239
Comment 5 Dani Megert CLA 2013-10-10 03:42:17 EDT
(In reply to Robin Stocker from comment #4)
> Such an NPE could still occur currently, as WizardDialog#getProgressMonitor
> is allowed to return null. Proposed fix:
> 
> https://git.eclipse.org/r/17239

Thanks Robin!

Submitted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=955a7e009278727fdfb295fd95ec68b49a50bf87
Comment 6 Daniel Rolka CLA 2013-10-29 11:59:03 EDT
Verified in the build: I20131028-2000