Bug 302396 - UI thread going crazy with owner-drawn tree in parent shell
Summary: UI thread going crazy with owner-drawn tree in parent shell
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 165030 202789 288702 296411 311259 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-10 05:30 EST by Michael Schneider CLA
Modified: 2011-04-08 09:34 EDT (History)
11 users (show)

See Also:


Attachments
TwistieSnippet.java (3.20 KB, text/x-java)
2010-03-26 10:48 EDT, Dani Megert CLA
no flags Details
patch (1.81 KB, patch)
2010-04-16 12:36 EDT, Felipe Heidrich CLA
no flags Details | Diff
testcase (8.92 KB, text/plain)
2010-04-16 15:23 EDT, Felipe Heidrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schneider CLA 2010-02-10 05:30:45 EST
Build Identifier: I20100129-1300

Since I moved to windows 7, I often see a problem where the CPU load would increase and nothing happens unless i switch to a different window or view.

This happens after running an action on an element on the tree (i usually do this via the context menu)

Yesterday, I was able to get stacktraces from the UI thread when this happens. The key to do so was that if the action brings up a dialog, the UI thread will continue doing whatever it is doing, even after switching to a different window. In my case, I tried an organize import on the source folder, however the changes were never applied because the UI thread was busy doing some painting.

Markus Keller had a look at the problem and made a few interesting observations:
- It seems that the trees affected by this use colored labels
- The animated twisties in the tree are not animated, but seem to be stuck in a state of the animation
- sometimes, the animation of the twisties seem to be stuck when focusing on a view or when moving the mouse onto the view (windows 7 issue?). It seems that the endless painting is caused in one of these cases. However, I do not have reproducible steps to get in a state where the twisty animation is not correctly shown

Attached are the stacktraces of the UI thread.

Markus also pointed to two bugs that describe a similar problem for Vista users:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=288702
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202789


Reproducible: Sometimes
Comment 1 Michael Schneider CLA 2010-02-10 05:32:37 EST
Thread [main] (Suspended)	
	org.eclipse.swt.internal.win32.OS.DeleteDC(int) line: not available [native method]	
	org.eclipse.swt.graphics.TextLayout.computeRuns(org.eclipse.swt.graphics.GC) line: 454	
	org.eclipse.swt.graphics.TextLayout.getBounds() line: 1565	
	org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider(org.eclipse.jface.viewers.StyledCellLabelProvider).updateTextLayout(org.eclipse.swt.graphics.TextLayout, org.eclipse.jface.viewers.ViewerCell, boolean) line: 307	
	org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider(org.eclipse.jface.viewers.StyledCellLabelProvider).measure(org.eclipse.swt.widgets.Event, java.lang.Object) line: 285	
	org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(org.eclipse.swt.widgets.Event) line: 56	
	org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 84	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1050	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(int, org.eclipse.swt.widgets.Event, boolean) line: 1074	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(int, org.eclipse.swt.widgets.Event) line: 1059	
	org.eclipse.swt.widgets.Tree.sendMeasureItemEvent(org.eclipse.swt.widgets.TreeItem, int, int) line: 4387	
	org.eclipse.swt.widgets.Tree.CDDS_ITEMPREPAINT(org.eclipse.swt.internal.win32.NMTVCUSTOMDRAW, int, int) line: 977	
	org.eclipse.swt.widgets.Tree.wmNotifyChild(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 7202	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).wmNotify(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 4897	
	org.eclipse.swt.widgets.Composite.wmNotify(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 1849	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).WM_NOTIFY(int, int) line: 4527	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).windowProc(int, int, int, int) line: 4016	
	org.eclipse.swt.widgets.Display.windowProc(int, int, int, int) line: 4744	
	org.eclipse.swt.internal.win32.OS.CallWindowProcW(int, int, int, int, int) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.CallWindowProc(int, int, int, int, int) line: 2341	
	org.eclipse.swt.widgets.Tree.callWindowProc(int, int, int, int) line: 1530	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Control).windowProc(int, int, int, int) line: 4052	
	org.eclipse.swt.widgets.Tree.windowProc(int, int, int, int) line: 5838	
	org.eclipse.swt.widgets.Display.windowProc(int, int, int, int) line: 4731	
	org.eclipse.swt.internal.win32.OS.DispatchMessageW(org.eclipse.swt.internal.win32.MSG) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.DispatchMessage(org.eclipse.swt.internal.win32.MSG) line: 2438	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3575	
	org.eclipse.jface.operation.ModalContext$ModalContextThread.block() line: 173	
	org.eclipse.jface.operation.ModalContext.run(org.eclipse.jface.operation.IRunnableWithProgress, boolean, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.swt.widgets.Display) line: 388	
	org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress) line: 507	
	org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(boolean, boolean, boolean) line: 191	
	org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startCleanupRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[], boolean, org.eclipse.swt.widgets.Shell, boolean, java.lang.String) line: 245	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).performRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[]) line: 91	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).runOnMultiple(org.eclipse.jdt.core.ICompilationUnit[]) line: 203	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).run(org.eclipse.jface.viewers.IStructuredSelection) line: 108	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction.run(org.eclipse.jface.viewers.IStructuredSelection) line: 223	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).dispatchRun(org.eclipse.jface.viewers.ISelection) line: 274	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).run() line: 250	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jface.action.Action).runWithEvent(org.eclipse.swt.widgets.Event) line: 498	
	org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(org.eclipse.swt.widgets.Event, boolean) line: 584	
	org.eclipse.jface.action.ActionContributionItem.access$2(org.eclipse.jface.action.ActionContributionItem, org.eclipse.swt.widgets.Event, boolean) line: 501	
	org.eclipse.jface.action.ActionContributionItem$5.handleEvent(org.eclipse.swt.widgets.Event) line: 411	
	org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 84	
	org.eclipse.swt.widgets.MenuItem(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1050	
	org.eclipse.swt.widgets.Display.runDeferredEvents() line: 3984	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3577	
	org.eclipse.ui.internal.Workbench.runEventLoop(org.eclipse.jface.window.Window$IExceptionHandler, org.eclipse.swt.widgets.Display) line: 2407	
	org.eclipse.ui.internal.Workbench.runUI() line: 2371	
	org.eclipse.ui.internal.Workbench.access$4(org.eclipse.ui.internal.Workbench) line: 2220	
	org.eclipse.ui.internal.Workbench$5.run() line: 500	
	org.eclipse.core.databinding.observable.Realm.runWithDefault(org.eclipse.core.databinding.observable.Realm, java.lang.Runnable) line: 332	
	org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 493	
	org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 149	
	org.eclipse.ui.internal.ide.application.IDEApplication.start(org.eclipse.equinox.app.IApplicationContext) line: 115	
	org.eclipse.equinox.internal.app.EclipseAppHandle.run(java.lang.Object) line: 194	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(java.lang.Object) line: 110	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(java.lang.Object) line: 79	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object) line: 367	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String[], java.lang.Runnable) line: 179	
	sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]	
	sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 39	
	sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 25	
	java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 597	
	org.eclipse.equinox.launcher.Main.invokeFramework(java.lang.String[], java.net.URL[]) line: 611	
	org.eclipse.equinox.launcher.Main.basicRun(java.lang.String[]) line: 566	
	org.eclipse.equinox.launcher.Main.run(java.lang.String[]) line: 1363	
	org.eclipse.equinox.launcher.Main.main(java.lang.String[]) line: 1339
Comment 2 Michael Schneider CLA 2010-02-10 05:33:00 EST
Thread [main] (Suspended)	
	org.eclipse.swt.internal.win32.OS.ScriptGetCMap(int, int, char[], int, int, short[]) line: not available [native method]	
	org.eclipse.swt.graphics.TextLayout.shape(int, org.eclipse.swt.graphics.TextLayout$StyleItem, char[], int[], int, org.eclipse.swt.internal.win32.SCRIPT_PROPERTIES) line: 3122	
	org.eclipse.swt.graphics.TextLayout.shape(int, org.eclipse.swt.graphics.TextLayout$StyleItem) line: 3180	
	org.eclipse.swt.graphics.TextLayout.computeRuns(org.eclipse.swt.graphics.GC) line: 242	
	org.eclipse.swt.graphics.TextLayout.getBounds() line: 1565	
	org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider(org.eclipse.jface.viewers.StyledCellLabelProvider).updateTextLayout(org.eclipse.swt.graphics.TextLayout, org.eclipse.jface.viewers.ViewerCell, boolean) line: 307	
	org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider(org.eclipse.jface.viewers.StyledCellLabelProvider).measure(org.eclipse.swt.widgets.Event, java.lang.Object) line: 285	
	org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(org.eclipse.swt.widgets.Event) line: 56	
	org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 84	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1050	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(int, org.eclipse.swt.widgets.Event, boolean) line: 1074	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Widget).sendEvent(int, org.eclipse.swt.widgets.Event) line: 1059	
	org.eclipse.swt.widgets.Tree.sendMeasureItemEvent(org.eclipse.swt.widgets.TreeItem, int, int) line: 4387	
	org.eclipse.swt.widgets.Tree.CDDS_ITEMPREPAINT(org.eclipse.swt.internal.win32.NMTVCUSTOMDRAW, int, int) line: 977	
	org.eclipse.swt.widgets.Tree.wmNotifyChild(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 7202	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).wmNotify(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 4897	
	org.eclipse.swt.widgets.Composite.wmNotify(org.eclipse.swt.internal.win32.NMHDR, int, int) line: 1849	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).WM_NOTIFY(int, int) line: 4527	
	org.eclipse.swt.widgets.Composite(org.eclipse.swt.widgets.Control).windowProc(int, int, int, int) line: 4016	
	org.eclipse.swt.widgets.Display.windowProc(int, int, int, int) line: 4744	
	org.eclipse.swt.internal.win32.OS.CallWindowProcW(int, int, int, int, int) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.CallWindowProc(int, int, int, int, int) line: 2341	
	org.eclipse.swt.widgets.Tree.callWindowProc(int, int, int, int) line: 1530	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Control).windowProc(int, int, int, int) line: 4052	
	org.eclipse.swt.widgets.Tree.windowProc(int, int, int, int) line: 5838	
	org.eclipse.swt.widgets.Display.windowProc(int, int, int, int) line: 4731	
	org.eclipse.swt.internal.win32.OS.DispatchMessageW(org.eclipse.swt.internal.win32.MSG) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.DispatchMessage(org.eclipse.swt.internal.win32.MSG) line: 2438	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3575	
	org.eclipse.jface.operation.ModalContext$ModalContextThread.block() line: 173	
	org.eclipse.jface.operation.ModalContext.run(org.eclipse.jface.operation.IRunnableWithProgress, boolean, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.swt.widgets.Display) line: 388	
	org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress) line: 507	
	org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(boolean, boolean, boolean) line: 191	
	org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startCleanupRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[], boolean, org.eclipse.swt.widgets.Shell, boolean, java.lang.String) line: 245	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).performRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[]) line: 91	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).runOnMultiple(org.eclipse.jdt.core.ICompilationUnit[]) line: 203	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).run(org.eclipse.jface.viewers.IStructuredSelection) line: 108	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction.run(org.eclipse.jface.viewers.IStructuredSelection) line: 223	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).dispatchRun(org.eclipse.jface.viewers.ISelection) line: 274	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).run() line: 250	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jface.action.Action).runWithEvent(org.eclipse.swt.widgets.Event) line: 498	
	org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(org.eclipse.swt.widgets.Event, boolean) line: 584	
	org.eclipse.jface.action.ActionContributionItem.access$2(org.eclipse.jface.action.ActionContributionItem, org.eclipse.swt.widgets.Event, boolean) line: 501	
	org.eclipse.jface.action.ActionContributionItem$5.handleEvent(org.eclipse.swt.widgets.Event) line: 411	
	org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 84	
	org.eclipse.swt.widgets.MenuItem(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1050	
	org.eclipse.swt.widgets.Display.runDeferredEvents() line: 3984	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3577	
	org.eclipse.ui.internal.Workbench.runEventLoop(org.eclipse.jface.window.Window$IExceptionHandler, org.eclipse.swt.widgets.Display) line: 2407	
	org.eclipse.ui.internal.Workbench.runUI() line: 2371	
	org.eclipse.ui.internal.Workbench.access$4(org.eclipse.ui.internal.Workbench) line: 2220	
	org.eclipse.ui.internal.Workbench$5.run() line: 500	
	org.eclipse.core.databinding.observable.Realm.runWithDefault(org.eclipse.core.databinding.observable.Realm, java.lang.Runnable) line: 332	
	org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 493	
	org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 149	
	org.eclipse.ui.internal.ide.application.IDEApplication.start(org.eclipse.equinox.app.IApplicationContext) line: 115	
	org.eclipse.equinox.internal.app.EclipseAppHandle.run(java.lang.Object) line: 194	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(java.lang.Object) line: 110	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(java.lang.Object) line: 79	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object) line: 367	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String[], java.lang.Runnable) line: 179	
	sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]	
	sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 39	
	sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 25	
	java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 597	
	org.eclipse.equinox.launcher.Main.invokeFramework(java.lang.String[], java.net.URL[]) line: 611	
	org.eclipse.equinox.launcher.Main.basicRun(java.lang.String[]) line: 566	
	org.eclipse.equinox.launcher.Main.run(java.lang.String[]) line: 1363	
	org.eclipse.equinox.launcher.Main.main(java.lang.String[]) line: 1339
Comment 3 Michael Schneider CLA 2010-02-10 05:33:46 EST
Thread [main] (Suspended)	
	org.eclipse.swt.internal.win32.OS.CallWindowProcW(int, int, int, int, int) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.CallWindowProc(int, int, int, int, int) line: 2341	
	org.eclipse.swt.widgets.Tree.callWindowProc(int, int, int, int) line: 1530	
	org.eclipse.swt.widgets.Tree(org.eclipse.swt.widgets.Control).windowProc(int, int, int, int) line: 4052	
	org.eclipse.swt.widgets.Tree.windowProc(int, int, int, int) line: 5838	
	org.eclipse.swt.widgets.Display.windowProc(int, int, int, int) line: 4731	
	org.eclipse.swt.internal.win32.OS.DispatchMessageW(org.eclipse.swt.internal.win32.MSG) line: not available [native method]	
	org.eclipse.swt.internal.win32.OS.DispatchMessage(org.eclipse.swt.internal.win32.MSG) line: 2438	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3575	
	org.eclipse.jface.operation.ModalContext$ModalContextThread.block() line: 173	
	org.eclipse.jface.operation.ModalContext.run(org.eclipse.jface.operation.IRunnableWithProgress, boolean, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.swt.widgets.Display) line: 388	
	org.eclipse.jface.dialogs.ProgressMonitorDialog.run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress) line: 507	
	org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(boolean, boolean, boolean) line: 191	
	org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startCleanupRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[], boolean, org.eclipse.swt.widgets.Shell, boolean, java.lang.String) line: 245	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).performRefactoring(org.eclipse.jdt.core.ICompilationUnit[], org.eclipse.jdt.ui.cleanup.ICleanUp[]) line: 91	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).runOnMultiple(org.eclipse.jdt.core.ICompilationUnit[]) line: 203	
	org.eclipse.jdt.internal.ui.actions.MultiOrganizeImportAction(org.eclipse.jdt.internal.ui.actions.CleanUpAction).run(org.eclipse.jface.viewers.IStructuredSelection) line: 108	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction.run(org.eclipse.jface.viewers.IStructuredSelection) line: 223	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).dispatchRun(org.eclipse.jface.viewers.ISelection) line: 274	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jdt.ui.actions.SelectionDispatchAction).run() line: 250	
	org.eclipse.jdt.ui.actions.OrganizeImportsAction(org.eclipse.jface.action.Action).runWithEvent(org.eclipse.swt.widgets.Event) line: 498	
	org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(org.eclipse.swt.widgets.Event, boolean) line: 584	
	org.eclipse.jface.action.ActionContributionItem.access$2(org.eclipse.jface.action.ActionContributionItem, org.eclipse.swt.widgets.Event, boolean) line: 501	
	org.eclipse.jface.action.ActionContributionItem$5.handleEvent(org.eclipse.swt.widgets.Event) line: 411	
	org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event) line: 84	
	org.eclipse.swt.widgets.MenuItem(org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 1050	
	org.eclipse.swt.widgets.Display.runDeferredEvents() line: 3984	
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 3577	
	org.eclipse.ui.internal.Workbench.runEventLoop(org.eclipse.jface.window.Window$IExceptionHandler, org.eclipse.swt.widgets.Display) line: 2407	
	org.eclipse.ui.internal.Workbench.runUI() line: 2371	
	org.eclipse.ui.internal.Workbench.access$4(org.eclipse.ui.internal.Workbench) line: 2220	
	org.eclipse.ui.internal.Workbench$5.run() line: 500	
	org.eclipse.core.databinding.observable.Realm.runWithDefault(org.eclipse.core.databinding.observable.Realm, java.lang.Runnable) line: 332	
	org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 493	
	org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 149	
	org.eclipse.ui.internal.ide.application.IDEApplication.start(org.eclipse.equinox.app.IApplicationContext) line: 115	
	org.eclipse.equinox.internal.app.EclipseAppHandle.run(java.lang.Object) line: 194	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(java.lang.Object) line: 110	
	org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(java.lang.Object) line: 79	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object) line: 367	
	org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String[], java.lang.Runnable) line: 179	
	sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]	
	sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 39	
	sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 25	
	java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 597	
	org.eclipse.equinox.launcher.Main.invokeFramework(java.lang.String[], java.net.URL[]) line: 611	
	org.eclipse.equinox.launcher.Main.basicRun(java.lang.String[]) line: 566	
	org.eclipse.equinox.launcher.Main.run(java.lang.String[]) line: 1363	
	org.eclipse.equinox.launcher.Main.main(java.lang.String[]) line: 1339
Comment 4 Markus Keller CLA 2010-02-10 07:09:10 EST
*** Bug 288702 has been marked as a duplicate of this bug. ***
Comment 5 Markus Keller CLA 2010-02-10 07:09:21 EST
*** Bug 202789 has been marked as a duplicate of this bug. ***
Comment 6 Markus Keller CLA 2010-02-10 08:07:16 EST
This is quite timing dependent. I observed the problem once, and that time, the twisties in the tree were initially hardly visible (almost white). After suspending and resuming the UI thread of the affected process a few times, the twisties became darker and darker. So this was during a "fade in" animation of the twisties.

These could be could be the steps that happen (not confirmed, since not reproducible):
- user opens context menu on tree item and chooses a long-running action
- child shell gets opened
- user's mouse is outside of the tree
-> "fade out" animation hides twisties
- user moves mouse into the tree
-> "fade in" animation is triggered, but the implementation has a bug that causes redraw of the entire tree for each animation step, instead of redrawing just the twisties
Comment 7 Felipe Heidrich CLA 2010-02-10 16:20:15 EST
I tried to reproduce this bug withou sucess.
You can please be a bit more specific on the steps ?

Can you reproduce this problem consistently on your machine ?
Can you reproduce this on another windows 7 machine ?
Comment 8 Michael Schneider CLA 2010-02-11 05:27:41 EST
unfortunately, i can't provide specific steps. It happens many times per day, but I can't find steps to reproduce it reliable.
Comment 9 Michael Schneider CLA 2010-02-11 05:30:39 EST
let me know if there's a trace option i should enable to find more details. alternatively, you could provide a patch containing some tracing code, I would run my eclipse using a patched SWT then.
Comment 10 Felipe Heidrich CLA 2010-02-11 16:41:38 EST
Sorry Michael, at this time I don't know where the problem can be. All the animation of the twisties is done by the OS.

You said the problem happens several times a day, so I think we can wait a few days and eventually you will find a reproducible steps for this problem.

I'm also runnng Windows 7 daily and I never saw this problem. Are you running standart Eclipse SDK or someother product based on Eclipse ?
Comment 11 Michael Schneider CLA 2010-02-12 15:25:30 EST
I'm currently running RTC (on Eclispe 3.6M5) and i'm seeing this issue since i moved to windows 7 (oct 2009).

The problem is quite annoying, I see it the most when using the "Pending Changes" view of RTC (which is essentially a tree with owner drawn stuff). But as you can see from the stacktraces, it also happened when running the default "Organize Imports" action. The defects to which Markus pointed show that others saw the very problem as well.

I tried to find a way to reproduce this, but was not successful up to now. I wont have the time to try reproducing this, unless i stumble onto the reproducible steps by accident.

The only additional observation I can make is that i often see that the twisty animation is stuck, and wont continue unless an other view and/or window was activated. I have not steps for this as well (Is there a bug for this?). But I suspect that the two issues are related (ie the drawing goes crazy when the twisty animation was stuck while invoking an action which requests repaint of the tree). My suspicion is based on the observation frequency of those two issues.
Comment 12 Markus Keller CLA 2010-02-15 05:06:48 EST
> ... run the "Organize Imports" action ...

Organize Imports must be invoked in the Package Explorer on a project (or another Java element) that contains enough code so that the progress dialog gets shown.

Alternative steps (still guessed) could be that the user is so quick that he can move the mouse into the tree and open the context menu before the twisties are shown. The problem could then be that the "fade in" animation is only started when the progress dialog is already open.

Another important factor could be whether the dialog overlaps the tree or not. Mike, could you please keep an eye on whether that's the case when it happens (or doesn't happen)?
Comment 13 Dani Megert CLA 2010-03-26 09:43:27 EDT
Here are two thread dumps taken while simply moving the mouse away from the
Package Explorer into the shell to make the dump:


"main" prio=6 tid=0x00519800 nid=0xba8 runnable [0x003dd000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.win32.OS.HeapAlloc(Native Method)
        at org.eclipse.swt.graphics.TextLayout.shape(TextLayout.java:3221)
        at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:240)
        at org.eclipse.swt.graphics.TextLayout.getBounds(TextLayout.java:1559)
        at
org.eclipse.jface.viewers.StyledCellLabelProvider.updateTextLayout(StyledCellLabelProvider.java:307)
        at
org.eclipse.jface.viewers.StyledCellLabelProvider.measure(StyledCellLabelProvider.java:285)
        at
org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(OwnerDrawLabelProvider.java:56)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011)
        at org.eclipse.swt.widgets.Tree.sendMeasureItemEvent(Tree.java:4370)
        at org.eclipse.swt.widgets.Tree.CDDS_ITEMPREPAINT(Tree.java:977)
        at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7185)
        at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4887)
        at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1838)
        at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4517)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4006)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4654)
        at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
        at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2338)
        at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1530)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4042)
        at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5821)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4641)
        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2435)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3508)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
        at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        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:367)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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:611)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1339)



"main" prio=6 tid=0x00519800 nid=0xba8 runnable [0x003dd000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.win32.OS.ScriptTextOut(Native Method)
        at org.eclipse.swt.graphics.TextLayout.drawRunText(TextLayout.java:982)
        at org.eclipse.swt.graphics.TextLayout.draw(TextLayout.java:759)
        at org.eclipse.swt.graphics.TextLayout.draw(TextLayout.java:571)
        at org.eclipse.swt.graphics.TextLayout.draw(TextLayout.java:548)
        at
org.eclipse.jface.viewers.StyledCellLabelProvider.paint(StyledCellLabelProvider.java:404)
        at
org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(OwnerDrawLabelProvider.java:59)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011)
        at org.eclipse.swt.widgets.Tree.CDDS_ITEMPOSTPAINT(Tree.java:849)
        at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7186)
        at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4887)
        at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1838)
        at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4517)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4006)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4654)
        at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
        at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2338)
        at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1530)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4042)
        at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5821)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4641)
        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2435)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3508)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
        at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        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:367)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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:611)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
Comment 14 Dani Megert CLA 2010-03-26 10:45:50 EDT
OK, I investigate this issue by adding paint, measure and erase listeners to a Tree snippet and then dumped out the events (see attached snippet). For fun you can also add some delay to see the twisties being delayed (repainted slowly).

It seems that Window 7 draws the twisties via several calls (ouch!). Each call triggers OS events to which SWT reacts. This alone means more CPU load. For owner draw this means that when focus is gained and also when lost, SWT sends the measure, paint and erase events several times for each item.

Windows XP on focus lost sends 0 measure/paint/erase events if there's no selection and one m/p/e event for each selected item. On Windows 7 more fun happens: here it sends it several times (due to the twistie animation) for each visible item! Worst case is then of course when switching from one Tree to another.


I don't know whether the OS allows to also owner draw the twisties or to draw in that area. If not, we might at least not send the m/p/e events in such cases i.e. detect the twistie redraw case on focus lost/gained.

Another option would be to disable the animation (not sure whether that's possible at all though).
Comment 15 Dani Megert CLA 2010-03-26 10:48:51 EDT
Created attachment 163084 [details]
TwistieSnippet.java
Comment 16 Felipe Heidrich CLA 2010-03-29 15:22:01 EDT
From the original description it looks like the animation was stuck (never finishing unless switching view/window). Do you have steps to reproduce this ?

Using Dani's testcase I could verify the higher number of events, but the animation would always finish (with the correct final state). At the first glance SWT does not have enough information from the OS to discard any events (it can't detect when the OS is only drawing the animated twisties).
Comment 17 Dani Megert CLA 2010-03-30 02:05:10 EDT
>Using Dani's testcase I could verify the higher number of events, but the
>animation would always finish (with the correct final state)
Yes, it does finish at some point but until then it loads your machine's CPU because if you have a navigator that takes the full vertical space and many items expanded - all tree items get drawn several times which includes all the owner draw stuff which is known to be slow. And if one switches from one navigator (e.g. Package Explorer) to another (e.g. Project Explorer) then the load on the machine is doubled because focus lost and focus gained make the CPU dance like crazy.

>. At the first
>glance SWT does not have enough information from the OS to discard any events
>(it can't detect when the OS is only drawing the animated twisties)
Do we (owner draw) allow to draw over the twisties and +/-? If not, couldn't we detect from the area that's being redrawn whether we need to redraw the items? If yes, could we add a flag to tell the tree that owner draw won't do this and hence optimize that case? Also, on focus lost, couldn't we simply not send out the owner draw events for non-selected items?

Another workaround would be to provide a way to completely disable twistie animation but so far I haven't found an option in the OS to do this. Maybe we can do this via OS tree API (didn't check)?
Comment 18 Felipe Heidrich CLA 2010-03-31 10:46:33 EDT
(In reply to comment #17)

> Do we (owner draw) allow to draw over the twisties and +/-? If not, couldn't we
> detect from the area that's being redrawn whether we need to redraw the items?
> If yes, could we add a flag to tell the tree that owner draw won't do this and
> hence optimize that case? 
The area during the twistie animation redraw and a normal redraw is the same.

> Also, on focus lost, couldn't we simply not send out
> the owner draw events for non-selected items?
I don't get it, do you want the tree to stop sending events from the time it gets the wm_killfocus till the time it gets the wm_setfocus ?
Isn't that the same as not sending events when the tree is not in focus ? I'm afraid it would cause bugs.


> Another workaround would be to provide a way to completely disable twistie
> animation but so far I haven't found an option in the OS to do this. Maybe we
> can do this via OS tree API (didn't check)?

That is easy, we just need to remove the TVS_EX_FADEINOUTEXPANDOS flag from createHandle(). It does fix the problem.
But, won't people complain ?

(of course, we would disable twistie animation only for custom draw trees on vista/seven - but that would still affect several users/views).
Comment 19 Dani Megert CLA 2010-03-31 10:56:29 EDT
>I don't get it, do you want the tree to stop sending events 
Not all events, just don't send measure/erase/paint in this case for unselected items (mimic the Windows XP behavior).

>That is easy, we just need to remove the TVS_EX_FADEINOUTEXPANDOS flag from
>createHandle(). It does fix the problem.
>But, won't people complain ?
Personally, I'd love to be able to disable this at the OS level (I don't like that animation at all). We could disable it by default on Vista & 7 but add a preference (visible only on Vista & 7) where users can enable it again (or the other way around for initial consistency with the OS). What we shouldn't do is disable just some of the trees in the SDK. This would need new API on either Display or Tree.

Of course finding a fix that brings the amount of measure/erase/paint events back to a level we see in Windows XP would be much better.
Comment 20 Felipe Heidrich CLA 2010-04-13 11:49:01 EDT
I don't believe we fully understand this problem.
Most of the time the animation finishes in a acceptable time. Other times, seemingly the same sequence the steps, causes the animation to take a long time (cpu busy). I never got to a situation that the animation wouldn't finish, but I had to wait for over a minute.

I don't have the steps to reproduce the bad case consistently.

If the problem was as simple as Dani put it, the animation should always be slow when switching from the package view to the explorer view. That is not true.

That said, we agree that disabling the animation (via java system property) should hide the problem. That is unfortunate, because Eclipse will not behave natively.

Disabling the animation only for custom draw (as mention before) is probably a bad idea, having the animation in some of trees (and not in other) for the same product will look wrong.

Comments ?
Comment 21 Dani Megert CLA 2010-04-13 11:58:07 EDT
> I never got to a situation that the animation wouldn't finish, but
>I had to wait for over a minute.
From looking at it with the people here, the initial comment was not fully correct on this i.e. keep on waiting will eventually finish the updating.

>If the problem was as simple as Dani put it, the animation should always be
>slow when switching from the package view to the explorer view. That is not
>true.
Not necessarily: the custom draw listeners can also cache state (e.g. CVS info) which means it can gave different the same costs.

>Disabling the animation only for custom draw (as mention before) is probably a
>bad idea, having the animation in some of trees (and not in other) for the same
>product will look wrong.
Agree.
Comment 22 Markus Keller CLA 2010-04-13 14:09:44 EDT
> I don't have the steps to reproduce the bad case consistently.

I don't have a Windows 7 machine at hand, but I suggest you take e.g. Dani's snippet and add something like "Thread.sleep(50);" to the listeners, such that redraw speed is still acceptable but the twistie animation starts to lag. And make sure the tree shows a lot of items with twisties.


Do the Windows APIs reveal anything about the animation (e.g. when it starts/stops, in what animation step we are, ...)? Anything that could help deciding whether the owner draw events should really be processed?

Or could you owner-draw the twisties using a more state-of-the-art animation algorithm (that doesn't use a fixed step count but synchronizes with wall time and immediately draws the final state if time is up)?
Comment 23 Felipe Heidrich CLA 2010-04-14 13:47:45 EDT
I suspect this problem is related to bug 165030
Comment 24 Felipe Heidrich CLA 2010-04-15 16:04:34 EDT
We are still trying to find better solution for this problem.
We discover a case where the animation timer will never stop (when the tree is hidden). We believe that fixing this timer will fix our main problem too.
Comment 25 Felipe Heidrich CLA 2010-04-16 11:43:22 EDT
Steps to reproduce the problem:

Open several views containing a tree, I my case I have:
Package Explorer;Project Explorer; Type Hierarchy; Javadoc in the left group.
Error Log; Problems; Search; Console in the bottom view group.
Outline; Declaration in the right view group.

The idea is show the tree with as many expandos visible as possible and hide it by selecting another view in the view group while the expandos of the first tree are still visible (or fading away). This causes the animation for the tree to loop forever. 

In my case, after a repeat the process for all views I will have the javadoc view showing in the left, the console showing in the bottom, and the declaration view in the right. At this point I should have 7 hidden trees going crazy (animation timer looping forever). Now try to show a tree again, one with lots of expands like the Package Explorer.

Please, let know if this process causes the slowness to happen to you too. Thank you.
Comment 26 Felipe Heidrich CLA 2010-04-16 12:36:20 EDT
Created attachment 165117 [details]
patch

If you were able to reproduce the problem using the instructions in comment #25 please apply the patch and try again. Let me know it the patch fixes the problem for you too. Thank you.
Comment 27 Felipe Heidrich CLA 2010-04-16 15:23:44 EDT
Created attachment 165138 [details]
testcase

This testcase has a PI only case that exposes the problem on windows: hidden the tree when the expandos are visible causes the timer to go forever.
run the snippet and click on the button. notice that the print out in the console keeps going non stop.
Comment 28 Felipe Heidrich CLA 2010-04-16 15:30:01 EDT
Fixed in HEAD > 20100416

Please verify
Comment 29 Felipe Heidrich CLA 2010-04-21 09:20:44 EDT
Please verify the fix in http://download.eclipse.org/eclipse/downloads/drops/I20100420-0800/index.php
Comment 30 Dani Megert CLA 2010-04-22 09:00:01 EDT
I prepared a patch with this fix for Dirk and Michael. So far it looks like this fixed their issue!
Comment 31 Markus Keller CLA 2010-04-23 13:45:46 EDT
*** Bug 296411 has been marked as a duplicate of this bug. ***
Comment 32 Greg Amerson CLA 2010-04-23 16:13:12 EDT
Great news on this fix.  Wondering if there is any easy way to get this fix into a galileo-sr2 install?  Is just applying the patch to SWT source for 3.5.2 and rebuilding the jar the only way?
Comment 33 Dani Megert CLA 2010-04-24 04:00:27 EDT
> Wondering if there is any easy way to get this fix
>into a galileo-sr2 install?
Replace the 3.5 SWT bundles with those from 3.6 (you
need to make sure that the files are named identically and that the bundle version in the manifests are the same as in the 3.5 bundles).
Comment 34 Greg Amerson CLA 2010-04-24 15:55:32 EDT
(In reply to comment #33)
> > Wondering if there is any easy way to get this fix
> >into a galileo-sr2 install?
> Replace the 3.5 SWT bundles with those from 3.6 (you
> need to make sure that the files are named identically and that the bundle
> version in the manifests are the same as in the 3.5 bundles).

Thanks for the tip!  I'll try that asap.
Comment 35 Markus Keller CLA 2010-05-10 11:57:24 EDT
*** Bug 311259 has been marked as a duplicate of this bug. ***
Comment 36 Markus Keller CLA 2011-04-08 09:34:53 EDT
*** Bug 165030 has been marked as a duplicate of this bug. ***