The program ended with exit code: 87

My iphone application crashes with this in the debug window:

Program completed with exit code: 87

Does anyone know what this exit code means. Google doesn't really help.

UPDATE: I found that this was caused when I tried to call

[mutArray objectForIndex:indexpath.row] 

and the index was out of range of the array.

The stack did not include anything other than the 87 code message. In addition, the console window did not even shift when the application crashed. Not very useful, I think. Does anyone know how to make it more useful in these situations?

+4
source share
1 answer

"Does anyone know how to make it more useful in these situations?"

First use CMD-SHIFT-R in Xcode to display the console window. You should have seen an error accessing an array with an out of bounds index.

Also, use CMD-Y to create and debug (vice CMD-R to create and run) your application. If it crashes, you will end up in the debugger (CMD-SHIFT-Y for the debug window) with the exact line of code that crashes, as well as the stack trace, all your variables, etc.

+1
source

All Articles