Project: JDT
Bug 223558 [breadcrumb] Blocked in endless display loop while opening dropdown
Reported: 2008-03-22 11:06:33 | Status: verified fixed

N20080320-2000 I can't tell exactly what I did, but here are some hints: A backup was running in the bg, taking away much of the hard disk performance. I clicked into a breadcrumb dropdown button, and when the dropdown didn't show up after a second, I clicked again (a few times). In the end, the main thread was using most of the CPU and Eclipse only reacted on UI events after 20s or more. The event loop in BreadcrumbItemDropDown.showMenu(BreadcrumbItemDropDown.java:340) looks suspicious. I guess it should include another break condition to ensure that showMenu(..) cannot be called recursively. "main" prio=6 tid=0x00397800 nid=0x86c runnable [0x009de000..0x009dfe68] java.lang.Thread.State: RUNNABLE at org.eclipse.swt.internal.win32.OS.$$YJP$$SendMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.SendMessageW(OS.java) at org.eclipse.swt.internal.win32.OS.SendMessage(OS.java:3057) at org.eclipse.swt.widgets.Tree.getItems(Tree.java:3195) at org.eclipse.swt.widgets.TreeItem.getItems(TreeItem.java:784) at org.eclipse.jface.viewers.TreeViewer.getChildren(TreeViewer.java:155) at org.eclipse.jface.viewers.AbstractTreeViewer.internalFindItem(AbstractTreeViewer.java:1760) at org.eclipse.jface.viewers.AbstractTreeViewer.doFindItem(AbstractTreeViewer.java:886) at org.eclipse.jface.viewers.StructuredViewer.findItems(StructuredViewer.java:779) at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1959) at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:543) at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1908) at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:1118) at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:74) at org.eclipse.jdt.ui.ProblemsLabelDecorator.fireProblemsChanged(ProblemsLabelDecorator.java:386) at org.eclipse.jdt.ui.ProblemsLabelDecorator.access$0(ProblemsLabelDecorator.java:381) at org.eclipse.jdt.ui.ProblemsLabelDecorator$1.problemsChanged(ProblemsLabelDecorator.java:361) at org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager$1.run(ProblemMarkerManager.java:179) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:130) - locked <0x17e90890> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3750) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3375) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown.showMenu(BreadcrumbItemDropDown.java:340) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown$1.run(BreadcrumbItemDropDown.java:91) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) 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$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown.showMenu(BreadcrumbItemDropDown.java:340) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown$1.run(BreadcrumbItemDropDown.java:91) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) 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$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown.showMenu(BreadcrumbItemDropDown.java:340) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown$1.run(BreadcrumbItemDropDown.java:91) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) 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$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown.showMenu(BreadcrumbItemDropDown.java:340) at org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbItemDropDown$1.run(BreadcrumbItemDropDown.java:91) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) 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$6.handleEvent(ActionContributionItem.java:451) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2368) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2332) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:476) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:471) 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) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/BreadcrumbItemDropDown.java