Menu

#10 Deadlock caused by ArrayIndexOutOfBounds

open
nobody
None
5
2012-09-23
2008-10-06
No

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.

Discussion


Log in to post a comment.