I was wondering if anyone can give me some insight on why I might be getting this occasional error.
for i in range(0, len(gameState.items)):
if gameState.items[i].idNum > 0:
The second line on rare occassion throws an error "List out of bounds", which shouldn't be possible as the iterative variable 'i' should not be able to exceed the maximum list size due to the len() constraint in the 'for i in range' statement.
The only way I thought this might be occurring is that the client thread that receives network data from the server may be acting upon the 'gameState.items[]' variable, but I have set a threadLock() on that thread while it is modifying variable data.
Anyone have any thoughts on why this might be happening?