Why is my application not closing even after a crash

I am working on an iPad application. Sometimes it crashes (I know the reason), but I wonder why the application does not close even after a crash! When the application crashed, I received some error related to the failure in the console, but the application does not close. It even appears in the multitasking panel (I see this when I press the home button twice). I am wondering if there are any settings for this? or is this normal behavior?

+5
source share
3 answers

If you use the application from Xcode, the debugger will still be attached so that the failure does not complete the process. You can use the Xcode debugger to take a look at the stack, check variables, etc. Only when you stop the application in Xcode will the process be fully completed.

+6
source

@ Mike Weller is right.

The typical behavior of the simulator is not to close the application upon failure, since the debugger is designed to stop at the point in the code where the failure occurs (for obvious reasons!).

If you want to check it out on the device for your satisfaction. Connect the device, run the application once on it using xcode. Close the application (stop xcode). Then disconnect the device.

, . , . , , iphone.

, , , , . ios android.

. ios , , . , .

+3

, , , .

, , , , ? , ?

:

@try {
   [test characterAtIndex:6];
}
@catch (NSException * e) {
   NSLog(@"Exception: %@", e);
}

The above code will not be broken because an exception will be detected. Capturing an exception tells the platform that you took care of the problem so that the application does not need to crash.

There could be many other reasons, but with the information you provided, this is my best guess. You can publish the magazine you see, which will undoubtedly give a better clue ...

0
source

All Articles