| Summary: | [Commands] ConcurrentModificationException in command manager during addExecutionListener | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jörg Mann <joerg.mann> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | christoph.pohl, michael.muehlberg |
| Version: | 4.3 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
|
Description
Jörg Mann
I can have a look at this, but the ICommandService is designed to be used on the UI thread and looking at the iterator loop in question, Command.addExecutionListener(*) doesn't fire out to any code that could update the list of commands in the iterator loop. How is this being added? PW Hi PW
the call happens during early startup inside an UIJob, but maybe someone else is calling the API in parallel in a non ui thread.
We currently use a workaround which seems to work so far
---snip---
try {
// first try
commandService.addExecutionListener(refreshCommandListener);
} catch (ConcurrentModificationException e) {
IStatus status = .... // a warning for error log
// second try usually succeeds
commandService.addExecutionListener(refreshCommandListener);
}
---snip---
Thanks
Jörg
OK, the array pattern can be used here as well. If someone provides a fix I'll consider it for Kepler SR1 or SR2. PW This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag. |