Look at nextLine:
Throws:
NoSuchElementException - if no line was found
IllegalStateException - if this scanner is closed
Make sure the scanner is not closed before you reach the line that causes the problem.. also make sure that.. there is a line.
I don't see any other problem that could cause your program to "crash" (You'll help us to help you if you better define what "crash" is)