The application crashes when it exits the app in the middle of the ...