Summary: | [JFace] Concurrent modification exception when adding category.xml categories | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Wim Jongman <wim.jongman> | ||||
Component: | UI | Assignee: | Andrey Loskutov <loskutov> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | carsten.hammer, daniel_megert, loskutov, simeon.danailov.andreev | ||||
Version: | 4.14 | Keywords: | regression | ||||
Target Milestone: | 4.15 M1 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=548309 https://git.eclipse.org/r/155341 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=408d3ea2ef60c3f71ccde9a667eeaa956c27f2e3 |
||||||
Whiteboard: | |||||||
Attachments: |
|
java.util.ConcurrentModificationException at java.util.Vector$Itr.checkForComodification(Vector.java:1210) at java.util.Vector$Itr.next(Vector.java:1163) at org.eclipse.ui.forms.ManagedForm.fireSelectionChanged(ManagedForm.java:123) at org.eclipse.pde.internal.ui.editor.TreeSection$PartAdapter.selectionChanged(TreeSection.java:36) at org.eclipse.pde.internal.ui.parts.TreePart.lambda$0(TreePart.java:44) at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2129) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1659) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084) at org.eclipse.pde.internal.ui.editor.category.CategorySection.handleAddCategoryDefinition(CategorySection.java:527) Simeon, can you please check if this is again a side effect of our favourite optimization? See bug 558510 etc. (In reply to Andrey Loskutov from comment #1) > Simeon, can you please check if this is again a side effect of our favourite > optimization? > See bug 558510 etc. For sure it is. Regression from https://git.eclipse.org/r/#/c/152807/. Same pattern as before, the listener notification code was buggy but "tolerated" re-entering the loop, now it is just buggy. Here is how the parts vector gets changed dujring iteration over it: Thread [main] (Suspended (breakpoint at line 82 in ManagedForm)) FormPage$PageForm(ManagedForm).addPart(IFormPart) line: 82 IUsPage$1(PDEDetailsSections).createContents(Composite) line: 35 DetailsPart.lambda$0(Object, IDetailsPage, IDetailsPage) line: 261 494474405.run() line: not available BusyIndicator.showWhile(Display, Runnable) line: 72 DetailsPart.showPage(Object) line: 258 DetailsPart.update() line: 231 DetailsPart.selectionChanged(IFormPart, ISelection) line: 216 FormPage$PageForm(ManagedForm).fireSelectionChanged(IFormPart, ISelection) line: 127 TreeSection$PartAdapter.selectionChanged(IStructuredSelection) line: 36 TreeSection$PartAdapter(TreePart).lambda$0(SelectionChangedEvent) line: 44 1903906274.selectionChanged(SelectionChangedEvent) line: not available Viewer$1.run() line: 151 SafeRunner$1.runWithResult() line: 47 SafeRunner$1.runWithResult() line: 1 SafeRunner.run(ISafeRunnableWithResult<T>) line: 77 SafeRunner.run(ISafeRunnable) line: 43 JFaceUtil.lambda$0(ISafeRunnable) line: 47 1920098017.run(ISafeRunnable) line: not available SafeRunnable.run(ISafeRunnable) line: 174 TreeViewer(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 148 TreeViewer(StructuredViewer).updateSelection(ISelection) line: 2129 TreeViewer(StructuredViewer).setSelection(ISelection, boolean) line: 1659 TreeViewer.setSelection(ISelection, boolean) line: 1084 CategorySection.handleAddCategoryDefinition() line: 527 CategorySection.buttonSelected(int) line: 471 TreeSection$PartAdapter.buttonSelected(Button, int) line: 47 SharedPartWithButtons$SelectionHandler.buttonSelected(SelectionEvent) line: 47 SharedPartWithButtons$SelectionHandler.widgetSelected(SelectionEvent) line: 37 TypedListener.handleEvent(Event) line: 252 EventTable.sendEvent(Event) line: 89 Display.sendEvent(EventTable, Event) line: 4163 The actual code was not nice, but it wasn't *that* buggy, because added part was at the end of the list. I will revert the olriginal change for M1. New Gerrit change created: https://git.eclipse.org/r/155341 Gerrit change https://git.eclipse.org/r/155341 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=408d3ea2ef60c3f71ccde9a667eeaa956c27f2e3 @Carsten: as usually, please create a new bug report for the ManagedForm.fireSelectionChanged iteration problem, this should be investigated & ideally a test should be added to the proposed fix of the original problem. > Simeon, can you please check if this is again a side effect of our favourite
> optimization?
> See bug 558510 etc.
Sorry, just noticed your question. Probably I didn't read past the stack trace in the initial notification.
Verified with build I20200106-1805. (In reply to Andrey Loskutov from comment #8) > Verified with build I20200106-1805. Andrey, thanks for taken care of this. (In reply to Andrey Loskutov from comment #6) > @Carsten: as usually, please create a new bug report for the > ManagedForm.fireSelectionChanged iteration problem, this should be > investigated & ideally a test should be added to the proposed fix of the > original problem. Yes, I will do - thanks for taking care! (In reply to Andrey Loskutov from comment #6) > @Carsten: as usually, please create a new bug report for the > ManagedForm.fireSelectionChanged iteration problem, this should be > investigated & ideally a test should be added to the proposed fix of the > original problem. created https://bugs.eclipse.org/bugs/show_bug.cgi?id=559046 |
Created attachment 281355 [details] stacktrace When creating a new category in the category.xml editor this exception was seen multiple times.