I have an NSRangeException
error that does not occur all the time(especially when I am debugging). It comes up randomly, and I am unable to figure out where it is coming from. I have lots of array manipulation, so its difficult to eliminate it that way.
My question is whether I can get a clue , for example class and line number from the debugger output, for example what are the numbers 12109 and 707?:
2012-03-15 09:25:15.303 appname[12109:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 2 beyond bounds [0 .. 0]'
Any pointers appreciated.
Edit: Remaining part of the log:
*** First throw call stack:
(0x33ff38bf 0x342431e5 0x33f4b275 0x1702d 0x37662331 0x3761b2b3 0x33f4d435 0x373b79eb 0x373b79a7 0x373b7985 0x373b76f5 0x3744de55 0x374e3e45 0x373aa99b 0x33fc7b4b 0x33fc5d87 0x33fc60e1 0x33f494dd 0x33f493a5 0x307cdfcd 0x373ca743 0x2325 0x22e4)
terminate called throwing an exception
Add an Exception breakpoint. This will stop on the line that raises the exception.
In the breakpoints navigator, click the plus in the bottom left, choose exception breakpoint, and all exceptions. You should have this on all projects really, it is invaluable. We'd have far fewer questions here, though!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With