What platform did you test on? And did you debug to check which line caused this error? Did you mean the
ApplicationState.StateChanged
invoked before the component initialized?