JeffN
JeffN

Reputation: 1605

CRASH: *** -[__NSArrayM objectAtIndex:]: index 4294967295 beyond bounds [0 .. 9]

I am getting an array out of bounds error at this ridiculous index, which based on my research says that there is probably some code calling something negative such as [array objectAtIndex: -1] Problem is that this isn't my code and I cannot find it anywhere. I have put breakpoints all over the place to no avail. I am thinking it may be in a UITableView Delegate method but can't be certain. Is there anyway to access the value of all my int variables in the log. I can't NSLog them because I don't know where the crash is occurring.

Thanks!

Upvotes: 2

Views: 4584

Answers (2)

Lithu T.V
Lithu T.V

Reputation: 20021

  1. Add an exception breakpoint
  2. Check the stack trace enter image description here
  3. find the last method executed
  4. Log the value used for getting array value

Upvotes: 1

JRG-Developer
JRG-Developer

Reputation: 12663

Try adding an exception breakpoint to see if this catches it:

1) Click on the breakpoints tab

2) Click on the "+" button on bottom left of said tab screen

3) Select "Add Exception Breakpoint"

4) (Optional) change Exception:All to Exception:Objective-C

5) Click done

This typically will break right on/before the line that's causing the crash.

Good luck.

Upvotes: 16

Related Questions