I would start with the assumption that code signing isn't the problem (unless your app does something weird like trying to modify the app bundle). Turn off code signing and see if you still have the problem.
Also, check the system logs, they should contain something about why the app is shutting down.