Welcome to the forums. Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

The first step in debugging to look at the stack trace...