With the following code i sometimes an excption:
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20 at the get(i) line
public void processCollisons(Octree aOctree,List<LeafCollisionSupportIF> leafList){
...
for (int i=leafList.size()-1; i>=0;i--){
LeafCollisionSupportIF leaf=aLeafList.get(i);
...
}
...
how is that possible? I think its a Thread problem but how to debug this. I already tryed a synronized Collection (
Collections.synchronizedList(new ArrayList<LeafCollisionSupportIF>())
) and make the method synchronized but without success.
I also cant reproduce this in a simple unittest.
Any tips how to debug this?