title: Why is NSIndexPath indexPathForItem returning an invalid path?
body: <p>I'm having an issue where the following function</p>
  
  <pre><code>[NSIndexPath indexPathForItem:item inSection:0]
  </code></pre>
  
  <p>sometimes returns an NSIndexPath object that has the following description:</p>
  
  <pre><code>&lt;NSIndexPath: 0x7a32c0&gt; {length = 2, path = 0 - 2147483648}
  </code></pre>
  
  <p>Obviously that's an invalid path, but I can't find any source that says why the function would be returning such a path. If I cancel the operation and run the same line of code a few moments later, it returns a correct value. </p>
  
  <p>The incorrect value being returned is seemingly random, so I'm trying to find out what would cause it to return such a value. The documentation states that it would return nil if there is no valid index path.</p>