Deadlock caused by ArrayIndexOutOfBounds
Status: Beta
Brought to you by:
chrriis
When running one of our products under SWTSwing we encountered a deadlock. This appeared to be caused by a loop in startExclusiveSection in UIThreadUtils never exiting. This in turn was caused by an ArrayIndexOutOfBounds exception occuring in _getItem(index) in Table.
Replacing the first line of this method with:
TableItem tableItem = null;
if (index >= 0 && index<itemList.size()) {
tableItem = (TableItem)itemList.get(index);
}
fixes the problem. However, this fix may not be appropriate in the more general case.