4

I have an strange error after removing an object in a NSMutableArray.

Before deleting an object

If i remove an object with

[Array removeObjectAtIndex:2];

the array changed to this:

enter image description here

why are there now 2 ContactViewControllers??

Phil
  • 341
  • 6
  • 19

1 Answers1

7

lldb lies sometimes. It gets confused and will display the incorrect information. Try doing

po Array

you should see the correct array contents then.

ahwulf
  • 2,584
  • 15
  • 29
  • 2
    This is scary... I thought Apple would've fixed [this bug](http://stackoverflow.com/questions/10963268/float-variables-assigned-value-from-line-above/10963683#10963683) by now – Alladinian Feb 12 '13 at 14:31
  • Yes it's quite stupid. lldb will often fail to showing anything up the stack, and sometimes confuses one variable with another. – ahwulf Feb 12 '13 at 21:32