Looks like the object (of type State) hasn't been initialized.

If you are certain you are initializing it, you may want to check over to see if you are waiting for user input or something...