After starting the generated application, it stops working

You give little info about what your app does.