title: Collection <NSCFSet: 0x1b0b30> was mutated while being enumerated. How to determine which set?
body: <p>I'm doing a bunch of core data inserts and after 20k or so inserts with saves every 1-2k I get this error:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection &lt;NSCFSet: 0x1b0b30&gt; was mutated while being enumerated.'
  </code></pre>
  
  <p>I'm trying to figure out which NSSet is causing this. I've done a search and the only NSSets in my code are the autogenerated ones that handle the Core Data relationships.</p>
  
  <p>I'm using NSXMLParser and for each element found creating a new entity (if a matching one doesn't already exist). </p>
  
  <p>So I will create a state entity and then populate all the city entities and then do a save. This means that a state's NSSet *cities is getting added to but I don't see why you can't do that.</p>