Project: Eclipse_Platform_UI
Bug 40524 Expansion of package view causes ConcurrentModificationException
Reported: 2003-07-19 16:46:21 | Status: closed fixed

Eclipse 3.0M2 The following exceptions occured in my log after opening and closing some nodes of the package explorer (having the progress view open) The ClassCastException appeared when changing to verbose mode while there was content in the progress view (stale content from the ConcurrentModificationException I assume) !MESSAGE Failed to execute runnable (java.util.ConcurrentModificationException) !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.util.ConcurrentModificationException) at org.eclipse.swt.SWT.error(SWT.java:2365) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:105) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1882) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) !ENTRY org.eclipse.ui 4 4 Jul 19, 2003 22:34:12.30 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Jul 19, 2003 22:34:12.30 !MESSAGE java.util.ConcurrentModificationException !STACK 0 java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762) at java.util.HashMap$KeyIterator.next(HashMap.java:798) at java.util.AbstractCollection.toArray(AbstractCollection.java:121) at org.eclipse.ui.internal.progress.ProgressContentProvider$1.runInUIThread (ProgressContentProvider.java:188) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:77) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:102) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1882) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) !ENTRY org.eclipse.ui 4 4 Jul 19, 2003 22:35:01.410 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Jul 19, 2003 22:35:01.410 !MESSAGE Failed to execute runnable (java.lang.ClassCastException) !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ClassCastException) at org.eclipse.swt.SWT.error(SWT.java:2365) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:105) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1882) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) !ENTRY org.eclipse.ui 4 4 Jul 19, 2003 22:35:01.420 !MESSAGE *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Jul 19, 2003 22:35:01.420 !MESSAGE java.lang.ClassCastException !STACK 0 java.lang.ClassCastException at org.eclipse.ui.internal.progress.ProgressContentProvider.getParent (ProgressContentProvider.java:95) at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand (AbstractTreeViewer.java:834) at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand (AbstractTreeViewer.java:836) at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget (AbstractTreeViewer.java:1288) at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget (StructuredViewer.java:1045) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:803) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:879) at org.eclipse.jface.viewers.StructuredViewer.refresh (StructuredViewer.java:839) at org.eclipse.ui.internal.progress.ProgressContentProvider$1.runInUIThread (ProgressContentProvider.java:186) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:77) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:102) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1882) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1680) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1663) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressContentProvider.java