It’s when tou try to access a part of an array that is outside the limits.
Either less than zero, or more than the size of the array will give this.
I found the mistake:
for(int x = 0; x tiles.length; x++)
{
for(int y = 0; y < tiles[x].length; x++)
{
// rendering code
}
}
Notice how you increment x in the y loop. There is the problem.