Why does this code crash half way through?

Printable View