{"action":"closed","issue":{"url":"https://api.github.com/repos/Wondermall/Doppelganger/issues/7","repository_url":"https://api.github.com/repos/Wondermall/Doppelganger","labels_url":"https://api.github.com/repos/Wondermall/Doppelganger/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Wondermall/Doppelganger/issues/7/comments","events_url":"https://api.github.com/repos/Wondermall/Doppelganger/issues/7/events","html_url":"https://github.com/Wondermall/Doppelganger/issues/7","id":144364868,"number":7,"title":"Mutating UICollectionView randomly crashes with incorrect data","user":{"login":"inb4ohnoes","id":1714873,"avatar_url":"https://avatars.githubusercontent.com/u/1714873?v=3","gravatar_id":"","url":"https://api.github.com/users/inb4ohnoes","html_url":"https://github.com/inb4ohnoes","followers_url":"https://api.github.com/users/inb4ohnoes/followers","following_url":"https://api.github.com/users/inb4ohnoes/following{/other_user}","gists_url":"https://api.github.com/users/inb4ohnoes/gists{/gist_id}","starred_url":"https://api.github.com/users/inb4ohnoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inb4ohnoes/subscriptions","organizations_url":"https://api.github.com/users/inb4ohnoes/orgs","repos_url":"https://api.github.com/users/inb4ohnoes/repos","events_url":"https://api.github.com/users/inb4ohnoes/events{/privacy}","received_events_url":"https://api.github.com/users/inb4ohnoes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T19:34:20Z","updated_at":"2016-03-29T21:42:06Z","closed_at":"2016-03-29T21:42:06Z","body":"On both tag 1.3.1 and the latest commit, mutating UICollectionView as follows will produce unpredictable results:\r\n\r\nold array: obj0, obj1, obj2, obj3, obj4, obj5, ... obj10\r\n\r\nnew array: obj1, obj0, obj2, obj3, obj4, obj5, ... obj10\r\n\r\nLikely error message: \r\n`*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0.  The number of items contained in an existing section after the update (11) must be equal to the number of items contained in that section before the update (11), plus or minus the number of items inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'`\r\n\r\nFrom preliminary investigation, the first part of the method `- (void)performDiff` with `*deletedObject` and `*insertedObject` should result in empty mutable sets if the previous and new arrays are simply being reordered, but that isn't always the case. Sometimes it works, but not all the time. I've checked my `isEqual` methods and they are foolproof as they are simply comparing two NSStrings. I'm not sure what's going on..."}}