Why is my app crashing after building successfully during startup?