This is probably due to the fact that either iOS5 did not throw an exception for this error (and should be, but now iOS6 throws one that is better than it has erratic behavior later), or because you have other behavior in iOS6 that makes your object nil while it was not in iOS5.
For any reason, you can add a Symbolic breakpoint to the insertObject:atIndex: symbol so that it is interrupted every time this method is called, wherever it is in your application (in your own code or not).
- Go to the Breakpoints Navigator view ( Cmd-6 shortcut)
- Click the + button to add a symbolic breakpoint.

- Set a symbolic breakpoint to break when it hits the
[NSArray insertObject:atIndex:] 
That way, you can see when this is called using the nil value for the first parameter and fix your problem where this happens.
Instead, you can add a Breakpoint Exception to break when an exception occurs, thereby knowing when your exception occurs in the code. This is another way to tell you which part of the code (your own or the other) throws an exception.

Once the breakpoint has been deleted and the program will stop before an exception occurs, you can check the call stack for how much of your own code caused this exception to be triggered at the end.
source share