title: NSRangeException Issue
body: <p>I am writing a Core Data-based iPhone app and I am new to Objective-C.</p>
  
  <p>I have a bug that I am really struggling to nail. The iPhone simulator keeps crashing with the following error message:</p>
  
  <blockquote>
    <p>2010-03-21 17:37:40.583 Patients[3689:207] <strong>* Terminating app due to uncaught exception 'NSRangeException', reason: '*</strong> -[NSCFArray insertObject:atIndex:]: index (1) beyond bounds (1)'
    2010-03-21 17:37:40.585 Patients[3689:207] Stack: (
        31007835,
        2516698377,
        31091771,
        31091610,
        601273,
        197333,
        3194546,
        3141378,
        25020,
        29768673,
        214570,
        30740485,
        204512,
        29114749,
        29505379,
        29001194,
        29252410,
        29190487,
        30794322,
        30791263,
        30788680,
        39097877,
        39098074,
        2883503,
        9912,
        9766
    )</p>
  </blockquote>
  
  <p>This error happens when I press return on a textField. What happens when the return key is pressed is that an attribute on an entity is updated.</p>
  
  <p>I don't know what array is out of bounds as I am not using any arrays in my code!</p>
  
  <p>Is there any way of getting more detail as to where in my code the error is??</p>
  
  <p>Thanks,</p>