The problems happens because your code modifies the list while iterating.
If you have only one thread which reads/writes from/to the list, then the most likely the call
this.createBufferStrategy(2);
sometimes adds some elements to the same array list. You could fix the exception if you will use a copy of the list to iterate:
for (Objects e : new ArrayList(list)) {
e.render(g);
}
- If you have MORE than one thread to read/write the list, use java.util.concurrent.CopyOnWriteArrayList instead