So, the first bug seems to occur because of the borders of the world. It's a 2D array of cells, and its dimensions are 100x100 and do not scale if they were crossed. That's why it's causing "memory access out of bounds" exception. And I suppose it was the ship crossing the borders, because you've already built some grounds on the same X and Y coordinates as the ground on the picture has.
So, I'd have to add some kind of auto-resizing algorithm, which would be triggered as the border was crossed.