You should initialize the MapTile 2D array using your mapLines
object. Right now you're assuming it will always be 22x34.
This could easily cause a cause a null pointer where some map tiles aren't initialized. It could also cause an IndexOutOfBounds.
Your error is going to come down to that. Somewhere you are not initializing that index in the mapTile array.