Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 391182 - push result dialog can block Eclipse UI
Summary: push result dialog can block Eclipse UI
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 475623 480324 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-05 00:34 EDT by Sam Davis CLA
Modified: 2015-10-21 12:28 EDT (History)
5 users (show)

See Also:


Attachments
Jstack while UI is unresponsive (21.17 KB, text/plain)
2015-09-14 12:02 EDT, Vasili Gulevich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-10-05 00:34:55 EDT
I invoked push to Gerrit and when the result dialog popped up, I hit Esc to close it. The dialog closed but the Eclipse window wouldn't respond after that, it just beeped when I clicked on it. I tried various things to get it back, and eventually was able to by pushing Alt+F4. It was almost as if hitting Esc caused the dialog to become invisible without closing. While Eclipse was not responding I got this stack trace from JConsole:


org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method)
org.eclipse.swt.widgets.Display.sleep(Display.java:4652)
org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
org.eclipse.jface.window.Window.open(Window.java:801)
org.eclipse.egit.ui.internal.push.PushToGerritPage.doPush(PushToGerritPage.java:231)
org.eclipse.egit.ui.internal.push.PushToGerritWizard$1.run(PushToGerritWizard.java:54)
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1029)
org.eclipse.egit.ui.internal.push.PushToGerritWizard.performFinish(PushToGerritWizard.java:51)
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
org.eclipse.jface.window.Window.open(Window.java:801)
org.eclipse.egit.ui.internal.commands.shared.PushHeadToGerritCommand.execute(PushHeadToGerritCommand.java:33)
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
Comment 1 Vasili Gulevich CLA 2015-09-14 12:02:04 EDT
Created attachment 256555 [details]
Jstack while UI is unresponsive

My steps to reproduce:

1. Clone a writable github repository with at least two bracnhes
2. Create two local branches from repository ones
3. Configure push for both branches explicitly
4. Delete one local branch
5. Select Push to Upstream from repository context menu.
6. Get an error about absent reference
7. Press Configure
8. In Configure push dialog remove deleted branch reference
9. Press Dry-run

Expected:
Resulting Push results dialog can be closed via OK button

Actual behavior:
There are four unresponsive windows:
Workbench
Configure Push
Progress information ("Trying to push to remote repositories")
Push results (displays successful push results)

UI repaints on OS requests, but no button can be clicked.

Alt-F4 workaround does not work in my environment (Linux, --launcher.GTK_version 2).

Attaching jstack output.
Comment 2 Andrey Loskutov CLA 2015-09-14 14:47:47 EDT
*** Bug 475623 has been marked as a duplicate of this bug. ***
Comment 3 Andrey Loskutov CLA 2015-09-14 17:40:19 EDT
Easier way to reproduce in debugger: put conditional breakpoint on line 589 in SimpleConfigurePushDialog with this snippet:
---
Thread.currentThread().sleep(1000);
return false;
---
As a result one should see 3 not-responding dialogs: push, result and progress.
The patch is coming.
Comment 4 Andrey Loskutov CLA 2015-09-14 17:42:44 EDT
(In reply to Andrey Loskutov from comment #3)
> Easier way to reproduce in debugger: put conditional breakpoint on line 589
> in SimpleConfigurePushDialog with this snippet:
> ---
> Thread.currentThread().sleep(1000);
> return false;
> ---

... and right click on <Repository> -> Remotes -> any remote node in Git Repositories view, select "Configure Push" and click on "Dry run".
Comment 5 Eclipse Genie CLA 2015-09-14 17:45:23 EDT
New Gerrit change created: https://git.eclipse.org/r/55926
Comment 6 Andrey Loskutov CLA 2015-09-14 17:50:23 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/55926

For me the bug/fix are reproducible.

Lars, Vasili: the nightly build, if succeeds (usually it does), will be available in 30 minutes. On the hudson job page https://hudson.eclipse.org/egit/job/egit.gerrit/7604/ you will see the link to the update site with the patched plugin. 

It would be nice if you could verify the fix in our environments, since I'm on Fedora Linux KDE desktop, and this is pretty seldom configuration AFAIK.
Comment 7 Eclipse Genie CLA 2015-09-16 18:34:48 EDT
Gerrit change https://git.eclipse.org/r/55926 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=527d3ae11591e8a6bcd584f5b660f22b6a57c8dd
Comment 8 Matthias Sohn CLA 2015-09-16 18:35:13 EDT
submitted
Comment 9 Andrey Loskutov CLA 2015-10-21 12:28:28 EDT
*** Bug 480324 has been marked as a duplicate of this bug. ***